Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
SAFCLiam
6 years agoNew member | Level 2
PHP Login with Dropbox issues.
Hello, im following the guide on how to use the APIs so my app can use Login with Dropbox. But im having issues getting a token.
This is my code to see why im getting the following error.
<?php
$request = new HttpRequest();
$request->setUrl('https://api.dropboxapi.com/2/auth/token/from_oauth1');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders(array(
'postman-token' => '273abf8c-7816-67c2-0949-f24bfc57383c',
'cache-control' => 'no-cache',
'content-type' => 'application/json',
'authorization' => 'Basic m1qbv920v0xwxlm:xxxxxx'
));
$request->setBody('{
"oauth1_token": "m1qbv920v0xwxlm",
"oauth1_token_secret": "xxxxx"
}');
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}This is the error.
{
"error_summary": "invalid_oauth1_token_info/.",
"error": {
".tag": "invalid_oauth1_token_info"
}
}1 Reply
Replies have been turned off for this discussion
- TaylorKrusen6 years ago
Dropbox Staff
The specific /2/auth/token/from_oauth1 endpoint you're using is only be for migrating legacy OAuth 1 access tokens to OAuth 2. If you're just building your app now, you wouldn't have any OAuth 1 access tokens so you wouldn't need to use that endpoint.
The full documentation for the Dropbox OAuth endpoints can be found here. Another helpful resource is our OAuth developer guide.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!