Blog & News

Feature Updates

Authentication Challenges - Salesforce

Oct 30, 20133 min read

Written by

David O'Neill

COO / CCO

David oversees operations and customer success at APIContext, helping enterprise clients get measurable value from API monitoring.

One of the key features of APIContext 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 APIContext, sign up today.

See what your APIs look like from the outside.

APIContext gives engineering, product, and customer success teams a shared view of API reliability, conformance, and customer impact — without rebuilding dashboards.

Start free