invalid_grant
-
Hello.
I’m having following error when I request a token from ‘/oauth/token/’ endpoint right after successfully getting authorization code.error: “invalid_grant”
error_description: “Authorization code doesn’t exist or is invalid for the client”And below is the request header and data.
url: http://mydomain/oauth/token/header (base64 encoded ClientId:ClientSecret):
Authorization: “Bearer dm9QcUNUdmRsQlhXVG45Y1l4ejVQV2FkYVZxRWRraTBGd2htTGtqajplNVJYZ0RWVEFsV2RxM1V2djVoUjFpMFRJMUFGTjdaTlpWRW12aHpZ”body:
code: “swsf21lutlcebtlule3jdisgnsriurb9kxi589wn”
client_id: “voPqCTvdlBXWTn9cYxz5PWadaVqEdki0FwhmLkjj”
client_secret: “e5RXgDVTAlWdq3Uvv5hR1i0TI1AFN7ZNZVEmvhzY”
redirect_uri: “https://www.myappserver.com/postaccount/authCallback?sns=7”
state: “3e1de11921200559323365b17a609f4b”
grant_type: “authorization_code”My callback server(https://www.myappserver.com) is running on a windows local testing environment.
I set my system clock exactly to current date-time. and I requested token immediately after I acquired authorization code.And I’m using free version so I only enabled “Authorization Code” grant type in wordpress’s oAuth server setting.
How can I fix this error?
Thanks a lot.
The topic ‘invalid_grant’ is closed to new replies.