cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create an App, get a Auth Token, try to use CURL to upload file, get a 400

Create an App, get a Auth Token, try to use CURL to upload file, get a 400

dhoerl1
New member | Level 2
Go to solution

Obviously I'm missing something.

 

I have an account, and created an App. I also created an OAUTH Token. I then found this curl script, and want to uplaod a file:

 

curl -X POST https://content.dropboxapi.com/2/files/upload \

    --header "Authorization: Bearer <token>" \

    --header "Dropbox-API-Arg: {\"path\": \"/1.jpg\"}" \

    --header "Content-Type: application/octet-stream" \

    --data-binary @./Cushion.jpg

 

I get this return: 

Error in call to API function "files/upload": Your app is not authorized to use this endpoint.

 

So how to I get it authorized?

1 Accepted Solution

Accepted Solutions

dhoerl1
New member | Level 2
Go to solution

User error - hadn't hit the SUBMIT button when I set the permissions. I just didn't see it buried at the bottom of the page, in a floating panel.

View solution in original post

2 Replies 2

dhoerl1
New member | Level 2
Go to solution

User error - hadn't hit the SUBMIT button when I set the permissions. I just didn't see it buried at the bottom of the page, in a floating panel.

Greg-DB
Dropbox Staff
Go to solution

Thanks for following up. I'm glad to hear you already sorted this out. 

 

For reference for anyone else who comes across this, the "Your app is not authorized to use this endpoint" error indicates that the app for the access token you're using to make the call does not have the necessary scope needed for calling that particular endpoint.

You can find information about what scope is needed for each endpoint in the documentation. For example, for /2/files/upload, you need the 'files.content.write' scope.

If your app doesn't already have the scope enabled, you can add it via the "Permissions" tab on the app's info page on the App Console. Then you can get a new access token with that scope added and use that new access token to make the API call.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
  • User avatar
    dhoerl1 New member | Level 2
What do Dropbox user levels mean?