Session Authenticate

Authenticates the API caller on the Symphony servers (pod) using a JWT.

Authenticate with public key

Based on an authentication request token signed by the caller's RSA private key, authenticate the API caller and return a session token.

A HTTP 401 Unauthorized error is returned on errors during authentication (e.g. invalid user, malformed authentication token, user's public key not imported in the pod, invalid token signature etc.).

POST//yourpodURL.symphony.com/login/pubkey/authenticate
Body
tokenstring

a JWT containing the caller's username or application appGroupId and an expiration date, signed by the caller's private key.

Response

OK.

Body
namestring

The name of the header in which the token should be presented on subsequent API calls.

tokenstring

Authentication token that should be passed as header in each API rest calls. This should be considered opaque data by the client. It is not intended to contain any data interpretable by the client. The format is secret and subject to change without notice.

authorizationTokenstring

(Beta) Short lived access token built from a user session. This field is still on Beta, please continue using the returned "token" instead.

Request
const response = await fetch('//yourpodURL.symphony.com/login/pubkey/authenticate', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "name": "text",
  "token": "text",
  "authorizationToken": "text"
}

❗️ Session Token Management

The token you receive is valid for the lifetime of a session that is defined by your pod's administration team. This ranges from 1 hour to 2 weeks.

You should keep using the same token until you receive a HTTP 401, at which you should re-authenticate and get a new token for a new session.

Datafeeds survive session expiration, you do not need to re-create your datafeed if your session expires.

🚧 Important

  • The following restrictions apply:

    • The JWT must have an expiration date between the current time and five minutes from the current time.

    • The JWT must be signed by a private key matching the public key saved for its subject ("sub").

  • For more information on creating and using an RSA session token, refer to RSA Bot Authentication Workflow.

Note that the Session Authenticate endpoint may return an authorizationToken (short lived access token built from a user session) in addition to the session token. Please note this has been introduced as beta and should not be used until further notice; please continue using the returned "token" instead.

Last updated