Receiving a 401 Authorization Required error on POST call to get Access Token via OAuth 2
I am able to get the Authorization code in the browser following the first step of OAuth 2.0 grant flow: https://developer.khoros.com/khoroscommunitydevdocs/reference/request-auth-code-lithium-registration
But getting a 401 Error on the call to get Access Token
Here is the call I am making:
method: 'POST'
url: 'https://wxample.example.com/api/2.0/auth/accessToken'
headers:
{'client_id':<URL_DECODED_CLIENT_ID>','content-type': 'application/json'}
data:
{
client_id: '<URL_DECODED_CLIENT_ID>',
client_secret: '<URL_DECODED_CLIENT_SECRET>',
code: '<URL_DECODED_AUTHORIZATION_CODE>',
grant_type: 'authorization_code',
redirect_uri: '<REDIRECT_URI_IN_APP>'
}
Receiving:
401 Authorization Required
Relevant docs: https://developer.khoros.com/khoroscommunitydevdocs/reference/request-auth-token-oauth
Any help would be appreciated.