Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't allow custom grant types #424

Open
fparra-adv opened this issue Aug 28, 2020 · 0 comments
Open

Doesn't allow custom grant types #424

fparra-adv opened this issue Aug 28, 2020 · 0 comments

Comments

@fparra-adv
Copy link

I am trying to use the refresh_token method to get an access token and getting this error.

The API I am using requires that I use the value "refresh_token" for grant type when requesting an access token. When creating an object it always starts with a grant type of 'authorization_code'.

prepare_token_request() got multiple values for argument 'grant_type'

kwargs = {
'grant_type': 'refresh_token',
'preserve_refresh_token': True,
'client_id': client_id,
'client_secret' : client_secret
}

auth =OAuth2Session()


access_token  = auth.refresh_token(token_url=token_url, refresh_token= refresh_token,  **kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant