Forum Discussion
khill wrote:a) Submit URL https://forums.stage.[ourcommunity].com/auth/oauth2/authorize?/clientid=[exact_client_id_shown_in_Web_API_App]&response_type&redirect_uri=forums.stage.[ourcommunity].com
b) Receive a "The page you are trying to access was not found. Please check your URL for typos and try again" in browser with following URL https://forums.stage.[mycommunity].com/t5/oauth/forums.stage.[mycommunity].com?code=[encoded_string]...
Can you include http:// or https:// (whichever your stage has) in front redirect_uri. It should be like this https://forums.stage.[ourcommunity].com/auth/oauth2/authorize?/clientid=[exact_client_id_shown_in_Web_API_App]&response_type&redirect_uri=http://forums.stage.[ourcommunity].com
The error you are getting on step b) is because, you didn't include the http or https.
Hi TariqHussain,
Thanks again for your help! :) I've tried adding the https:// to the redirect URI as you noted above. Now I am no longer receiving an error after passing the initial GET request which returns with code in my URL, however, I am still receiving a 500 error (via HttpRequester on Firefox) or "Unexpected Error" (via Chrome using Postman after prompting my login credentials) after the POST request. Any ideas? Here are my new steps to recreate:
1) Sign in with credentials to https://forums.stage.[mycommunity].com
1) Pass GET request via URL https://forums.stage.[mycommunity].com/auth/oauth2/authorize?client_id=[exactly_as_shown_in_Apps_API]&response_type=code&redirect_uri=https://forums.stage.[mycommunity].com
2) No longer see an error page and am returned to the base stage page with the URL https://forums.stage.[mycommunity].com/?code=[encoded_code]&user-id=125&tenant-id=[mytenantid]&proxy-host=api.stage.lithium.com
3) Pass a POST request via HttpRequester using:
URL: https://api.stage.lithium.com/auth/v1/accessToken
Header:
client_secret: [exactly_as_shown_in_API_Web_Apps]
client_id: [exactly_as_shown_in_API_Web_Apps]
code: [encoded_code_from_URL_in_step_2] <- also tried decoded but didn't seem to make a difference
content-type: "application/json"
grant_type: "authorization_code"
Results:
{"status":"Internal Server Error","message":"Internal Server Error","statusCode":500}
Any ideas? I am sure I am just doing something simple wrong, but can't seem to figure it out.
Thanks again!
Kate