Expired Access/Refresh Token
After wasting frustrated time solving an auth issue, I wanted to post a quick note that some may find helpful: if you’re attempting to test your Salesforce API app against your sandbox instance and getting “expired access/refresh token” errors, make sure to append your sandbox name to the username. For example, if your username is:
And your sandbox name is:
Make sure that when connecting to your sandbox instance, you change your username to:
You’ll also need to change your endpoint to
https://test.salesforce.com/services/oauth2/token, but you probably already knew that.
This information is in the documentation, but it’s buried at the bottom. I hope this helps you save a little time and hair pulling!
Latest posts by Jack Jones (see all)
- Salesforce API Testing with Username-Password Authentication - 2014-12-10
- Being Human - 2014-01-21
- Why Are You An Entrepreneur? - 2013-11-09