Start 2025 on time and up to date. Seamlessly integrate your calendars into Dropbox with these simple steps.
Forum Discussion
vimala_palanisamy22
3 years agoExplorer | Level 3
Error while generating token
I am trying to generate access token with the api https://api.dropbox.com/oauth2/token but i m getting error like {"error": "invalid_request", "error_description": "Can't use \"Authorization\" header and \"client_secret\" arg together."}|__|0=https://api.dropbox.com/oauth2/token|__|1={"error": "invalid_request", "error_description": "Can't use \"Authorization\" header and \"client_secret\" arg together."} But we didnt pass any header while calling token api
- Greg-DBDropbox Staff
I just tried out this flow and it seems to be working correctly for me. Here's a sample of what I ran (with values redacted):
# https://www.dropbox.com/oauth2/authorize?client_id=APPKEY&response_type=code&token_access_type=offline curl https://api.dropbox.com/oauth2/token \ -d code=AUTHORIZATIONCODE \ -d grant_type=authorization_code \ -d client_id=APPKEY \ -d client_secret=APPSECRET # { # "access_token": "ACCESSTOKEN", # "token_type": "bearer", # "expires_in": 14400, # "refresh_token": "RERESHTOKEN", # "uid": "USERID", # "account_id": "ACCOUNTID" # } curl https://api.dropbox.com/oauth2/token \ -d refresh_token=RERESHTOKEN \ -d grant_type=refresh_token \ -d client_id=APPKEY \ -d client_secret=APPSECRET # { # "access_token": "NEWACCESSTOKEN", # "token_type": "bearer", # "expires_in": 14400 # }
If that isn't working properly for you, please share the steps and code to reproduce the issue so we can look into it.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,924 PostsLatest Activity: 22 hours ago
If 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!