# Retrieve the WebPros access token

This function returns the stored WebPros access token for
360 Monitoring.

This function does not accept any parameters. It returns the
access_token value from the token bundle that the server stored during
the WebPros single sign-on flow, and the number of seconds that remain
before that token expires. The function never returns the refresh token
or the rest of the token bundle.

The function fails with a data.reason value of no_valid_token when
the server does not store a token or when the stored token is no longer
valid. Use the 360Monitoring/webpros_auth_status function to find out
why the stored token is not valid, and the
360Monitoring/webpros_auth_start function to start a new
authentication flow.

The access token is a bearer credential. Transmit it only over HTTPS and
do not write it to logs.

Endpoint: GET /360Monitoring/webpros_auth_token
Version: 11.138.0.19
Security: BasicAuth

## Response 200 fields (application/json):

  - `data` (object)

  - `data.access_token` (string)
    The WebPros access token. The function only returns
this field when a valid token exists.
    Example: "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NSJ9.Example"

  - `data.error` (string)
    The error message. The function only returns this
field when it could not return an access token.
    Example: "No valid authentication token is available."

  - `data.expires_in` (integer)
    The number of seconds until the access token expires.
The function only returns this field when a valid
token exists. The value is 0 when the system could
not determine the remaining lifetime.
    Example: 780

  - `data.reason` (string)
    The machine-readable reason that the function could
not return an access token.

It is the following value:
* no_valid_token - The server does not store a valid token. Call the 360Monitoring/webpros_auth_status function for the details.
    Example: "no_valid_token"

  - `metadata` (object)

  - `metadata.command` (string)
    The method name called.
    Example: "webpros_auth_token"

  - `metadata.namespace` (string)
    The namespace used in the API call.
    Example: "360Monitoring"

  - `metadata.reason` (string)
    The reason the API function failed when the metadata.result
field is 0. This field may display a success message when
a function succeeds.
    Example: "OK"

  - `metadata.result` (integer)
    * 1 - Success.
* 0 - Failed. Check the reason field for more details.
    Enum: 0, 1

  - `metadata.version` (integer)
    The version of the API function.
    Example: 1


