[SalesForce] URL_NOT_RESET error REST API

I have created the REST Resource to fetch the data from Salesforce. My Domain is also activated in our Org.

When I fetch the data using https://myDomain.my.salesforce.com/…/… it is returning me data but when I try with https://test.salesforce.com/…/… it is giving me below error

[
{
"errorCode": "URL_NOT_RESET",
"message": "Destination URL not reset. The URL returned from login must be set"
}
]

Let me know your thoughts on this

Thanks

Best Answer

test.salesforce.com or login.salesforce.com can be used to first login. Thereafter requests should be made using the instance_url and the access_token that you receive as a response on first login.

So, in your case you can used your Custom Domain but not the login URL.

Related Topic