function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Webservice callout failed : Call is not authorised



I am making a webservice callout from my sandbox and sending sessionId as well as Enterprise Server Url with the request, since service authenticates the request by callback to server url, whether it is valid or not using this information.

Its working fine in the org.


Now When i included that page in site and tried to make callout, its giving message - "Call is not authorised."


It might be because of server url since site has its own domain, so server url might be differ here.


NOw thw question is what will be the apiServerUrl in case of site so callback can be successfull.


You'll need plus the api URL of your server (which is NOT the URL of the browser's access). Ex: should use as the access server.