GlideOAuthToken - Scoped, Global

Use the GlideOAuthToken methods for retrieving OAuth access token and information about the access token.

This API can be used in global and scoped scripts. In scoped scripts us the sn_auth namespace identifier.

GlideOAuthToken - getAccessToken()

Retrieves the access token.

Table 1. Parameters
Name Type Description
none
Table 2. Returns
Type Description
String The access token.

GlideOAuthToken - getAccessTokenSysID()

Retrieves the sys_id of the token ID.

Table 3. Parameters
Name Type Description
none
Table 4. Returns
Type Description
String The sys_id of the access token.

GlideOAuthToken - getExpiresIn()

Retrieves the lifespan of the access token in seconds.

Table 5. Parameters
Name Type Description
none
Table 6. Returns
Type Description
Number The lifespan.

GlideOAuthToken - getRefreshToken()

Retrieves the lifespan of the access token in seconds.

Table 7. Parameters
Name Type Description
none
Table 8. Returns
Type Description
Number The refresh token.

GlideOAuthToken - getRefreshTokenSysID()

Retrieves the sys_id of the refresh token.

Table 9. Parameters
Name Type Description
none
Table 10. Returns
Type Description
Number The sys_id of the refresh token.

GlideOAuthToken - getScope()

Retrieves the scope, which is the amount of access granted by the access token.

Table 11. Parameters
Name Type Description
none
Table 12. Returns
Type Description
String The scope.