We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
sarahModulo
2 years agoExplorer | Level 3
Qt OAuth get refresh token
Hi, I try to get my refresh token after going throw the basic authentification flow with PKCE. Here my code : connect(m_auth, &QAbstractOAuth2::authorizationCallbackReceived,[=](const QVariant...
- 2 years ago
Please note that when calling /oauth2/token, you should not include an access token. The /oauth2/token endpoint can be used to exchange an authorization code for an access token and optional refresh token, or to use a refresh token to get a new access token. It does not itself expect or accept an access token as input. When calling /oauth2/token, the "Authorization" header is a way to supply the app key and secret, as an alternative to the client_id and client_secret parameters. You can find more information in the documentation for /oauth2/token, as well as this blog post which contains a useful example.
You should only set the redirect_uri parameter on /oauth2/token if you used a redirect_uri on /oauth2/authorize when retrieving the authorization code, and if so, it must exactly match that redirect_uri value.
sarahModulo
Explorer | Level 3
In postman I have the same issus if I set an Access Token in Authorization part.
Here the post request "https://api.dropboxapi.com/oauth2/token?code=<AuthorizationCode>&grant_type=authorization_code&client_id=<api_id>&client_secret=<api_secret>"
error
{
"error": "invalid_request",
"error_description": "Can't use \"Authorization\" header and \"client_secret\" arg together."
}
if I remove client_id and client_secret from the post request
post request : "https://api.dropboxapi.com/oauth2/token?code=<AuthorizationCode>&grant_type=authorization_code"
error
{
"error": "invalid_request",
"error_description": "The request parameters do not match any of the supported authorization flows. Please refer to the API documentation for the correct parameters."
}
If I remove my Access Token in Authorization part
with post request "https://api.dropboxapi.com/oauth2/token?code=<AuthorizationCode>&grant_type=authorization_code&client_id=<api_id>&client_secret=<api_secret>"
error
{
"error": "invalid_grant",
"error_description": "redirect_uri mismatch"
}
But Callback URL is the one I set in my dropBox Api... Should I put an other redirect_uri ? And which one ? And where should I set it ? In Param section or Authorization section ?
Greg-DB
2 years agoDropbox Staff
Please note that when calling /oauth2/token, you should not include an access token. The /oauth2/token endpoint can be used to exchange an authorization code for an access token and optional refresh token, or to use a refresh token to get a new access token. It does not itself expect or accept an access token as input. When calling /oauth2/token, the "Authorization" header is a way to supply the app key and secret, as an alternative to the client_id and client_secret parameters. You can find more information in the documentation for /oauth2/token, as well as this blog post which contains a useful example.
You should only set the redirect_uri parameter on /oauth2/token if you used a redirect_uri on /oauth2/authorize when retrieving the authorization code, and if so, it must exactly match that redirect_uri value.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 12 months agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!