Api: Question: CORS request did not succeed for Browser Based Apps

Created on 20 Oct 2019  Â·  7Comments  Â·  Source: Bungie-net/api

Hello!

I filled out the Origin Header section where we register our application:
Screen Shot 2019-10-20 at 2 11 25 PM

Though when I hit the https://www.bungie.net/Platform/App/OAuth/Token/ endpoint:
Screen Shot 2019-10-20 at 3 28 00 PM

I'm getting a Cross-Origin Request Blocked error in the console:
Screen Shot 2019-10-20 at 3 29 20 PM
Screen Shot 2019-10-20 at 3 32 51 PM

Don't know what I'm doing wrong here. Any help appreciated.

Most helpful comment

add the trailing / to https://www.bungie.net/Platform/App/OAuth/Token

All 7 comments

I removed the X-API-Key from the header

You need X-API-Key in the header for the requests to succeed.

Assuming you're just developing locally for now, I think it's safe to set the origin header to *. Once you deploy your code to the internet you'd want that to match your domain name, of course.

I thought Bungie doesn’t allow * in the site admin settings?

On Oct 20, 2019, at 13:18, Andy Schott notifications@github.com wrote:


You need X-API-Key in the header for the requests to succeed.

Assuming you're just developing locally for now, I think it's safe to set the origin header to *. Once you deploy your code to the internet you'd want that to match your domain name, of course.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

@andyschott I added back the X-API-Key and changed the Origin Header to: *
I'm still getting a 307 | Temporary Redirect

@floatingatoll I've used it frequently, but I'm using the keys in a server app, not a browser based one. Maybe that's the difference?

@juwanpetty I'm not sure what else to suggest - I haven't personally seen that error. :( Maybe someone else here will have some ideas.

add the trailing / to https://www.bungie.net/Platform/App/OAuth/Token

@delphiactual That fixed my problem, thanks!

Was this page helpful?
0 / 5 - 0 ratings