Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Salesforce by (11.9k points)

We implemented OAuth 2.0 using Web Server Authentication Flow. It was working fine in October/November but all of a sudden it has stopped working. Whenever we try authorizing another client the server return (400) Bad Request with the body

{"error":"unsupported_grant_type","error_description":"grant type not supported"}

grant_type is set as authorization_code which is definitely valid.

Is there any reason why OAuth would suddenly stop working?

1 Answer

0 votes
by (32.1k points)
edited by

So actually, there needs to be a space before 

grant_type=authorization_code 

in HTTP POST payload which was causing an issue.

Well, there is a possibility that Salesforce has fixed a bug or made an internal change to discard space before grant_type=authorization_code.

Want to learn about Salesforce in depth? Enroll in this Salesforce course provided by Intellipaat!

Browse Categories

...