Sync Salesforce token for Rhapsody Service Platform

API toolWorkatoDeveloper ToolAPI Integration

What it does

When someone sends a request to the token endpoint, this automation validates the consumer key header and retrieves a Salesforce token. It returns the token on success or an error code if validation fails.

Who it's for

IT teams who need a secure token endpoint for Rhapsody to authenticate with Salesforce.

How teams use this

Authenticate Rhapsody with Salesforce

Rhapsody calls the token endpoint with its consumer key to get a fresh Salesforce token for API calls. The token is returned immediately so Rhapsody can proceed with its integration.

Reject requests from unknown consumers

If a request arrives with an invalid or missing X-SF-Consumer header, this automation returns 401 Unauthorized before contacting Salesforce. Only trusted Rhapsody instances can retrieve tokens.

Handle Salesforce outages gracefully

When Salesforce is down or returns an error, this automation catches the failure and returns 420 to Rhapsody instead of retrying. Add error logging to track Salesforce outages and set alert thresholds for the team.

How it works

  1. Receive token request. Listen for a request to the token endpoint with the X-SF-Consumer header that identifies the Rhapsody service platform consumer.
  2. Validate consumer key. Check the X-SF-Consumer header against the stored Rhapsody service platform consumer key. Return 401 Unauthorized if it does not match.
  3. Request Salesforce token. Send a request to the Salesforce token endpoint with stored credentials using the link from the project property rhapsody-service-platform.sf.token.url.
  4. Return token or error. Return the Salesforce token to Rhapsody on success, or return 420 if Salesforce reports a method failure or connection error occurs.