- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2023 05:38 AM
Hi,
I am configuring oauth2 using Connection and credentials aliases in ServiceNow to authorize salesforce spoke. I use https://www.youtube.com/watch?v=vr1dpZSm1jA&pp=ygUbc2VydmljZW5vdyBzYWxlc2ZvcmNlIHNwb2tl
But I failed and get the error "URL No Longer Exists" when I am trying to Get OAuth Token
Why does it happen?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2023 11:22 PM - edited 09-18-2023 11:22 PM
Hi @Alex153
This typically indicates a problem with the OAuth configuration or the URL being used for the token request. Try below troubleshooting steps:
1) Ensure that you have configured the OAuth provider correctly in ServiceNow. Make sure that the client ID, client secret, token URL, and other OAuth configuration details are accurate.
2) Double-check the token URL you are using in your OAuth request. It should be the correct URL provided by Salesforce for obtaining OAuth tokens. The URL should be in the format: https://<salesforce_instance_url>/services/oauth2/token.
3) Verify that there are no typos or syntax errors in the URL you are using. Pay special attention to any special characters or spaces that might be causing issues.
4) Try using tools like Postman or cURL to manually test the token request URL outside of ServiceNow. This can help you determine if the URL is valid and if Salesforce is responding to token requests.
5) Ensure that your Salesforce environment is correctly configured to allow OAuth access and that the connected app and OAuth settings in Salesforce are set up properly. Verify that the callback URL in Salesforce matches the one specified in your ServiceNow OAuth configuration. This you could check with the help of Salesforce Admin Support team.
6) Check if the OAuth token you are using (if any) has expired. OAuth tokens typically have a limited validity period, and if the token has expired, you will need to obtain a new one.
7) Check the ServiceNow instance logs for any errors or warnings related to the OAuth token request. This may provide insights into what specifically is causing the issue.
8 ) In some cases, cached data in your browser or ServiceNow instance might cause issues. Try clearing the cache and cookies in your browser or consider clearing the cache in ServiceNow.
Hope this helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2023 11:22 PM - edited 09-18-2023 11:22 PM
Hi @Alex153
This typically indicates a problem with the OAuth configuration or the URL being used for the token request. Try below troubleshooting steps:
1) Ensure that you have configured the OAuth provider correctly in ServiceNow. Make sure that the client ID, client secret, token URL, and other OAuth configuration details are accurate.
2) Double-check the token URL you are using in your OAuth request. It should be the correct URL provided by Salesforce for obtaining OAuth tokens. The URL should be in the format: https://<salesforce_instance_url>/services/oauth2/token.
3) Verify that there are no typos or syntax errors in the URL you are using. Pay special attention to any special characters or spaces that might be causing issues.
4) Try using tools like Postman or cURL to manually test the token request URL outside of ServiceNow. This can help you determine if the URL is valid and if Salesforce is responding to token requests.
5) Ensure that your Salesforce environment is correctly configured to allow OAuth access and that the connected app and OAuth settings in Salesforce are set up properly. Verify that the callback URL in Salesforce matches the one specified in your ServiceNow OAuth configuration. This you could check with the help of Salesforce Admin Support team.
6) Check if the OAuth token you are using (if any) has expired. OAuth tokens typically have a limited validity period, and if the token has expired, you will need to obtain a new one.
7) Check the ServiceNow instance logs for any errors or warnings related to the OAuth token request. This may provide insights into what specifically is causing the issue.
8 ) In some cases, cached data in your browser or ServiceNow instance might cause issues. Try clearing the cache and cookies in your browser or consider clearing the cache in ServiceNow.
Hope this helps you.