I’m trying to move an API request that I have working on Postman to a PHP/WordPress website. To help with this I referred to this previous discussion regarding how to get an oAuth access token through CURL Need help on how to programatically get Access Token [PHP]
From this, I then made the following (with tokens changed)
I have checked the console on Postman and it appears that the Base64 Encoded string for the authorization is the same so is there any other reason why my request to get the access token would fail?
The request looks good – although it looks like the value for the Authorization header seems off. To troubleshoot the Invalid authorization code error, can you try to make a request to the auth endpoint :
Thanks I have now solved this. I thought the authorization code you got from step 1 could be reused to get multiple access tokens but I understand that’s not the case.
I have sorted this now. Thanks for your assistance