Tech Solvr
Tech Solvr

Reputation: 505

No 'Access-Control-Allow-Origin' header is present on the requested resource. - Pinterest oauth implementation

I am implementing oauth for pinterest and able to get the access code, but when I am trying to do a GET /v1/me/ I am getting this error in chrome console -

XMLHttpRequest cannot load https://api.pinterest.com/v1/me?oauth_token=XXXXX&v=20121125. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://localhost:3000' is therefore not allowed access.

In general I know its related to headers setting in server end for enabling CORS, but I want to know specifically how can I make it working for pinterest.

Upvotes: 0

Views: 966

Answers (2)

prateek31
prateek31

Reputation: 312

Seems like you have not whitelisted your URL (https://localhost:3000) in the pinterest developers section where it asks you to specify redirect url. Hope this helps!

Upvotes: 1

user6186801
user6186801

Reputation:

Try jsonp method to do a cors request in angualrjs.

$http.jsonp('https://api.pinterest.com/v1/me?oauth_token=XXXXX&v=20121125&callback=JSON_CALLBACK')

Upvotes: 0

Related Questions