Salesforce: How to get the access token expires_at
Blog post from Nango
Salesforce's OAuth implementation deviates from standard conventions by not providing the `expires_at` parameter in its token endpoint response, which typically indicates when an access token will expire. Instead, users must make an additional API request to Salesforce's token introspection endpoint to obtain the expiration date, which is returned in the `exp` field as a Unix timestamp. This extra step is necessary for ensuring timely token refreshes, as failing to do so could result in failed API requests due to expired tokens. Implementing Salesforce OAuth efficiently can be complex and time-consuming, but solutions like Nango can simplify the process by offering pre-built implementations for Salesforce and other APIs, along with features such as automatic token refreshes, secure token storage, and detection of broken tokens.