Invalid URL

API Discussion
Hello everyone.

I have created an api client but after i try to
https://us.battle.net/oauth/authorize
Always get response status "Invalid URL"
My return URL is SSL secured, and i am pretty sure i use the right client and private keys for the call.

Maybe someone has same issue. Thanks you : )
Try to do "Authorization Request" in your browser. If I use Blizzards "Try It", i'll get "Invalid URL" too.
12/09/2018 07:59 AMPosted by Logifire
Try to do "Authorization Request" in your browser. If I use Blizzards "Try It", i'll get "Invalid URL" too.


Yea, same here, from browser get this error response
Although it's not working in the "try it now" feature on the developer portal, the authorize URL works just fine for me, e.g., pasting it into my browser (and all my apps are also working):

https://us.battle.net/oauth/authorize?response_type=code&client_id=(my-client-id)&redirect_uri=(my-redirect-URL)&scope=wow.profile%20sc2.profile
12/10/2018 04:21 AMPosted by Dawg6
Although it's not working in the "try it now" feature on the developer portal, the authorize URL works just fine for me, e.g., pasting it into my browser (and all my apps are also working):

https://us.battle.net/oauth/authorize?response_type=code&client_id=(my-client-id)&redirect_uri=(my-redirect-URL)&scope=wow.profile%20sc2.profile


Yes on first call it worsk but after i try to get the token with
https://us.battle.net/oauth/token?grant_type=authorization_code&code=(authcode)&redirect_uri=(callbackurl)&client_id=(clientid)

It says:
"{"error":"invalid_client","error_description":"Bad client credentials"}"

and they 100% are not wrong
You cannot request a token for the authorization_code flow using HTTP GET, you must use HTTP POST and encode the parameters in the body.

e.g.,

curl -X POST https://us.battle.net/oauth/token
-u <developer client id>:<developer secret>
-d redirect_uri=<redirect URI used in authorize request>
-d scope=<space separated scopes>
-d grant_type=authorization_code
-d code=<authorization code>


See https://develop.battle.net/documentation/guides/using-oauth/authorization-code-flow.
Ahh thank you dude i wondering why this isnt work, now i figure out.
Save my world : )

Join the Conversation

Return to Forum