Unauthorized endpoint REST API integration

  • 1
  • Question
  • Updated 3 years ago
  • Answered
We have exposed a json based REST API and now we are trying to connect to Same using Skuid model and we are getting below error.
Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint =

"Token Endpoint URL configured under Authentication Provider "

Error is in expression '{!run}' in component <apex:page> in page skuid:oauthproxy: (skuid)

Let me know if some settings are missing
Photo of Sandeep Singh

Sandeep Singh

  • 100 Points 100 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,056 Points 20k badge 2x thumb
You need to add a Salesforce Remote Site Setting corresponding to the Domain portion of your Authentication Provider's Authorize Endpoint URL and/or Token Endpoint URL, if they have different Domains then you will need to add a Remote Site Setting for each.

For example, Sharepoint Online has a different domain for the Authorize Endpoint URL required than for the Token Endpoint URL:

Authorize Endpoint URL: https://acme.sharepoint.com/_layouts/15/OauthAuthorize.aspx
Token Endpoint URL: https://accounts.accesscontrol.windows.net/acme.onmicrosoft.com/tokens/OAuth/2

For this setup, you would need to add TWO Remote Site Settings (by going to Setup > Remote Site Settings, and creating two separate Remote Site Settings, one for each of the following domains:

Remote Site Setting 1 URL: https://acme.sharepoint.com
Remote Site Setting 2 URL: https://accounts.accesscontrol.windows.net




(Edited)
Photo of Sandeep Singh

Sandeep Singh

  • 100 Points 100 badge 2x thumb
Thanks Zack,

I had just one domain for Authorize Endpoint URL and for the Token Endpoint URL
so I created one security settings in salesforce for that.
Next when I went in then I faced below error while loading model I am getting following error.

"Loading sample body for REST service...Error connecting to REST Data Source at URL "security setting URL + Laterhalf of REST URL": Not Found: Not Found The requested URL Laterhalf of REST URL was not found on this server.
Is it possible if we can meet so that I can shown you issues which we are facing.

Thanks & Regards
Sandeep