Auth Namespace

From Genesys Documentation
Revision as of 17:52, March 25, 2021 by Julie.munn@genesys.com (talk | contribs) (Published)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.

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 string The callback function to use if the operation succeeded.
failed string The callback function to use if the operation failed.
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!