how to get bearer token using python