requests-oauthlib icon indicating copy to clipboard operation
requests-oauthlib copied to clipboard

validate_token_parameters Error Check

Open satiowadahc opened this issue 3 years ago • 2 comments

From Autodesk API an example error is: {'developerMessage': 'The required parameter(s) client_id not present in the request', 'errorCode': 'AUTH-008', 'more info': 'https://forge.autodesk.com/en/docs/oauth/v2/developers_guide/error_handling/'}

parameters.py :validate_token_parameters(params): if 'error' in params: raise_from_error(params.get('error'), params)

Never gets caught. This was a fair amount of debugging. May update if I find more information

satiowadahc avatar Jul 01 '21 18:07 satiowadahc

https://github.com/requests/requests-oauthlib/blob/46f886ccb74652fc9c850ece960edcf2bce765a5/requests_oauthlib/oauth2_session.py#L422

Since scope is sent the API rejects it. I guess I gotta make a PR if I want this fixed...

satiowadahc avatar Jul 01 '21 19:07 satiowadahc

I now realize that parameters.py isn't part of this repo, but the scope is. PR made #449

satiowadahc avatar Jul 01 '21 19:07 satiowadahc