cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Get summer ready with Dropbox basic - travel documents, plans, progress reminders and more, right over here.

Discuss Dropbox Developer & API

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

CORS error on any endpoint

CORS error on any endpoint

Anton P
New member | Level 2

After successful authorization and getting the token I try to test it by fetching basic '/user' endpoint and I always get CORS error. Chrome Browser.

1) with preflish request:

pic1.pngpic2.png

2) Without preflight request:

pic4.png

What am I doing wrong, please help!

1 Accepted Solution

Accepted Solutions

Re: CORS error on any endpoint

Anton P
New member | Level 2

OK, I figured that out. Silly mistake. Appears that 'api.dropboxapi.com/2/check/user'

is a POST method while I was sending a GET request. The mistake would be avoided if the documentation stated that it's a POST message instead of just specifying that in a curl example which I haven't looked at.

 

View solution in original post

3 Replies 3

Re: CORS error on any endpoint

Anton P
New member | Level 2

OK, I figured that out. Silly mistake. Appears that 'api.dropboxapi.com/2/check/user'

is a POST method while I was sending a GET request. The mistake would be avoided if the documentation stated that it's a POST message instead of just specifying that in a curl example which I haven't looked at.

 

Re: CORS error on any endpoint

Greg-DB
Dropboxer

Can you share the full error output for reference?

 

Looking at the screenshots though, I do see two things that should be corrected:

Re: CORS error on any endpoint

Greg-DB
Dropboxer

It looks like our messages just crossed. I'm glad to hear you already sorted this out, and thanks for the feedback!

Poll
Which Dropbox Plan do you have?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
  • User avatar
    Anton P New member | Level 2
What do Dropbox user levels mean?
Need more support?