Forum Discussion
Did you ever find out how to make the call? I'm having the same issue and it is so frustrating :(
Hi fuenteso,
Please find calls below :-
1. URL hit >>
[comunity_base_url_with_http_or_https]/auth/oauth2/authorize?client_id=[url_encoded_client_id]&response_type=code&redirect_uri=[comunity_base_url_without_http]
response >> gets redirected to a URL where 'code', 'user-id', 'tenent-id' are returned as parameters
http://[comunity_base_url_without_http]/t5/oauth/[comunity_base_url_without_http]?code=actual_code_here&user-id=user_id_here&tenant-id=tenant_id_here
2. POST >> accessToken
https://api.stage.lithium.com/auth/v1/accessToken
headers >>
client_id : [url_docoded_format_your_client_id], content-type : application/json
content to send >>
{
"code" : "[url_docoded_format_your_code]",
"client_id" : "[url_docoded_format_your_client_id]",
"client_secret" : "[url_docoded_format_your_client_secret]",
"redirect_uri" : "[comunity_base_url_without_http]",
"grant_type" : "authorization_code"
}
{"response":{"httpCode":200,"message":"OK","status":"success","data":{"lithiumUserId":"actual_alphanumeric_id","userId":"actual_interger_id","access_token":"actual_access_token","expires_in":86400,"refresh_token":"actual_refresh_token","token_type":"bearer"}}}
Please let me know if you need any more details.
Thanks,
Vaishnavi
Related Content
- 6 years ago
- 2 years ago