Hello.
When using code authorization grant authentication with the Python SDK, I get a KeyError about the method being unable to get the refresh token.
Line in code that generates the error is the following:
" apiclient, auth_token_info = PureCloudPlatformClientV2.api_client.ApiClient().get_code_authorization_token(....) "
Throws the following error, with:
ERROR: /usr/local/lib/python3.10/site-packages/PureCloudPlatformClientV2/api_client.py, line 206, in get_code_authorization_token:
self.refresh_token = data[0]["refresh_token"]
Value of "data" in runtime was: [{'access_token': '...................',
'expires_in': 86398,
'token_type': 'bearer'}]
So from what I can deduce, "data" is returning the expected values of access_token, expires_in, and token_type; but not "refresh_token". Why is this happening? How can I fix this?
I have used this python authentication method before and it worked fine. I even want back and logged the values of "data" in those authentications, and I could see it WAS returning "refresh_token".
Thanks for any help you can give.