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.

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 Error while fetching data from URL https://docs.genesys.com/index.php?title=Special:CargoExport&tables=OptionCreate%2CPubOption%2CPubExtended%2CPubOption&join+on=OptionCreate._pageName%3DPubOption._pageName%2COptionCreate._pageName%3DPubExtended._pageName&fields=OptionCreate._pageName%3Dpagename%2COptionCreate.urlparameter%2COptionCreate.parameter%3Dparameter%2C+OptionCreate.component%3Dcomponent%2C+OptionCreate.compshort%3Dcompshort%2C+OptionCreate.urlsection%3Durlsection%2C+OptionCreate.section%3Dsection%2C+OptionCreate.prodshort%3Dprodshort%2C+PubOption.defaultvalue%3DPubDefault%2C+PubOption.valid%3DPubValid%2C+PubOption.takeseffect%3DPubEffect%2C+PubOption.shortdesc%3DPubShort%2C+PubExtended.dependencies%3DPubDepend%2C+PubExtended.introduced%3DPubIntro%2C+PubExtended.modified%3DPubMod%2C+PubExtended.discontinued%3DPubDisc%2C+PubExtended.feature%3DPubFeature%2C+PubExtended.mandatory%3DPubMandatory%2C+PubExtended.mode%3DPubMode%2C+PubExtended.moredesc%3DPubMore%2C+OptionCreate.configobject%3Dconfigobject&where=OptionCreate._pageName+LIKE+%27Options:Genesys_Web_Services:interaction-workspace:service-client-api-accepted-web-content-origins%27&order+by=%60cargo__OptionCreate%60.%60_pageName%60%2C%60cargo__OptionCreate%60.%60urlparameter%60%2C%60cargo__OptionCreate%60.%60parameter%60%2C%60cargo__OptionCreate%60.%60component%60%2C%60cargo__OptionCreate%60.%60compshort%60&limit=100&format=json&parse_values=yes.
HTTP request timed out.
Could not get URL https://docs.genesys.com/index.php?title=Special:CargoExport&tables=OptionCreate%2CPubOption%2CPubExtended%2CPubOption&join+on=OptionCreate._pageName%3DPubOption._pageName%2COptionCreate._pageName%3DPubExtended._pageName&fields=OptionCreate._pageName%3Dpagename%2COptionCreate.urlparameter%2COptionCreate.parameter%3Dparameter%2C+OptionCreate.component%3Dcomponent%2C+OptionCreate.compshort%3Dcompshort%2C+OptionCreate.urlsection%3Durlsection%2C+OptionCreate.section%3Dsection%2C+OptionCreate.prodshort%3Dprodshort%2C+PubOption.defaultvalue%3DPubDefault%2C+PubOption.valid%3DPubValid%2C+PubOption.takeseffect%3DPubEffect%2C+PubOption.shortdesc%3DPubShort%2C+PubExtended.dependencies%3DPubDepend%2C+PubExtended.introduced%3DPubIntro%2C+PubExtended.modified%3DPubMod%2C+PubExtended.discontinued%3DPubDisc%2C+PubExtended.feature%3DPubFeature%2C+PubExtended.mandatory%3DPubMandatory%2C+PubExtended.mode%3DPubMode%2C+PubExtended.moredesc%3DPubMore%2C+OptionCreate.configobject%3Dconfigobject&where=OptionCreate._pageName+LIKE+%27Options:Genesys_Web_Services:interaction-workspace:service-client-api-accepted-web-content-origins%27&order+by=%60cargo__OptionCreate%60.%60_pageName%60%2C%60cargo__OptionCreate%60.%60urlparameter%60%2C%60cargo__OptionCreate%60.%60parameter%60%2C%60cargo__OptionCreate%60.%60component%60%2C%60cargo__OptionCreate%60.%60compshort%60&limit=100&format=json&parse_values=yes after 3 tries.
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>"
    }