We’ve got a Python script that pulls WFM adherence data every hour. It’s currently using Authorization Code with PKCE, but the refresh token logic is a mess.
- Running on a dedicated Ubuntu server in US/Central
- Using
genesyscloudPython SDK v2.0 - Need to query
/api/v2/wfm/schedulesand/api/v2/wfm/users - No human interaction, just cron jobs
Should I switch to Client Credentials grant? The docs say it’s for server-to-server, but I don’t see how I scope it to specific divisions like I do with the user token. Here’s the current token exchange setup:
oauth_client = oauth.OAuthClient(
client_id=config['client_id'],
client_secret=config['client_secret'],
grant_type='authorization_code',
redirect_uri=config['redirect_uri']
)
If I change grant_type to client_credentials, what happens to the division context?