Error while access token.

usmanusman Member Posts: 6

I am trying to access the token for API but i am getting below Error.

{"error":"invalid_request","error_description":"The grant type was not specified in the request"}

i am using C# window application and Please find attach my sample code for your review.

Kindly consider it as urgent matter.


  • gregaricangregarican Member Posts: 709 
    I'm not sure if there's a difference in US versus other regions, but here's the URL that works for me:

    I have the same elements in the request body --- client_id, client_secret, code, and grant_type. The grant_type being authorization_code.

    By the way, you should probably sanitize your examples by masking your credentials when posting on here. Otherwise you are exposing the keys to the kingdom :smiley:
  • usmanusman Member Posts: 6
    actually i solved it. i was sending client id and etc in header, should be in request body :)

Sign In or Register to comment.