Authentication Challenges – Salesforce

One of the key features of APImetrics is our ability to handle oAuth tokens for tests and calls requiring authentication.  As we’ve rolled out our beta program we’ve found that there’s more variation in performance and operation than we expected but it has been interesting to explore.  We recently encountered issues with the Salesforce oAuth service which required us to make some changes to our generic token handling.

In our product, you can set tokens to automatically renew, however, we found that with Salesforce tokens were not being updated and after 2 hours, the tests would start to fail.  For other users with an interest in Salesforce here are the steps to ensure trouble free testing:

  1. Your Salesforce Connected App must be set up with the refresh_token scope to ensure you get new tokens
  2. Under Test Management > Auth Tokens you need to set the refresh period manually, for Salesforce the default is 2 hours so 7200
  3. They also tie tests into specific URLs which is returned via the instance_url variable – we’ve changed our UI to provide this to you

Additionally, we’ve found an interesting feature where Salesforce occasionally add a ‘.’ to client IDs which needs to be encoded to %2E – this is a peculiar exception and we’re trying to identify with Salesforce if this is intentional.

We’d love to hear back from Salesforce about this, so if you are reading this get in touch with us.

If you’re not using APImetrics, sign up today.

Sign Up to Our Newsletter

Want to be updated on latest API Metrics Insights? Sign up to our newsletter and receive latest news and blog from us.

Add an API

Related Posts

Join Us Now!

Join the 100s of companies relying on APImetrics.
Share