Auth Namespace

From Genesys Documentation
Jump to: navigation, search
This topic is part of the manual Service Client API Reference for version Current of Developer.

Learn about the Auth namespace methods and type definitions in the Service Client API.

Important
Depending on your environment, you might need to contact your Genesys representative to complete the configuration described on this page.

Methods

The Auth namespace includes the following methods:

getJwtToken

To use the auth.getJwtToken endpoint, you must explicitly define the full endpoint name in the service-client-api-accepted-web-content-origins option. For example: service-client-api.accepted-web-content-origins = https://genesyspureengage.github.io (*, auth.getJwtToken)

Signature <static> getJwtToken(succeeded, failed) → {JSON object}
Description Get the JWT access token for the current session. If the token is already generated and still valid, it is returned; otherwise a new token is returned.
Parameters
Name Type Description
succeeded function A function called when the operation succeeds.
failed function A function called when the operation fails.
Returns JSON data object with the token and its expiration date in ISO 8601 date format.
"data": {
    "expiration": "2020-04-14T13:26:51.846Z",
    "jwtToken": "<your_jwt_token>"
}
Comments or questions about this documentation? Contact us for support!