Forum Discussion
rajpi
Adept
Hi fuenteso
I got the Oauth issue resolved, error was with appropriate permissions on the account and also some extra characters that went in the client id. Here is how I solved this issue, this may be useful to someone.
- Log into community and then run the following call in your browser (be sure to add the URL encoded client ID and you can leave the redirect uri as is):
- Get Authorization Code:
GET
https://<communityname_withouthttps>/auth/oauth2/authorize?client_id=<urlencodedclient_id>&response_type=code&redirect_uri=<exact_callbackuri_with_https_nothingextra> - You should receive an authorization code that can be leveraged to obtain the access & refresh tokens
- https://api.lithium.com/auth/v1/accessToken
Header:
Content-Type : application/json
client_id : <client_id_without_encoding> Body ==> JSON(application/json)
{"client_id":"<client_id>",
}
"client_secret":"<client_secret>",
"grant_type":"authorization_code",
"redirect_uri":"<redirect_url>",
"code":"<AuthCode>"
Thanks
Raj
shravani
8 years agoGuide
What are the appropriate permissions required?
I am getting the following response
{
"status": "Unauthorized",
"message": "client-id header or client_id query parameter is not authorized. Set your header to the value of your clientId or URL encode it to set as query param",
"statusCode": 401
}
Related Content
- 6 years ago
- 2 years ago