Jump to content

Strange behaviour trying to get an oauth grant


Angalexik

Recommended Posts

The api docs say that in order to get an oauth grant I need to perform a request like this:

curl -XPOST "https://backpack.tf/oauth/access_token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: 1.0" \
--data-urlencode "grant_type=client_credentials" \
--data-urlencode "client_id=myawesomeapp" \
--data-urlencode "client_secret=abc123" \
--data-urlencode "scope=read write"

And this works, however as soon as I try to encode it in the url in any other way for example, like this:

curl -XPOST "https://backpack.tf/oauth/access_token?grant_type=client_credentials&client_id=myawesomeapp&client_secret=abc123&scope=read%20write" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Accept: 1.0"

The response says `The authorization grant type is not supported by the authorization server.`

 

I thought those 2 perform the same exact request, can someone please tell me where I messed up?

Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...