# Check the WebPros authentication status

This function reports whether the server holds a valid WebPros
authentication token for 360 Monitoring.

This function does not accept any parameters. It reads the token that
the server stored during the WebPros single sign-on flow, checks that
the token contains an identity token, and checks whether the token has
expired.

The function returns data.valid with a value of 1 when a usable
token exists. When the token is not usable, the function returns
data.valid with a value of 0 and a machine-readable
data.reason value.

The function does not return the access token or the refresh token.
Use the 360Monitoring/webpros_auth_token function to retrieve the
access token.

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

## Response 200 fields (application/json):

  - `data` (object)

  - `data.email` (string)
    The email address from the email claim of the stored
identity token. The function only returns this field
when the token is valid. The function omits this field
when the identity token does not contain an email
claim.
    Example: "user@example.com"

  - `data.expired_at` (integer)
    The Unix timestamp at which the stored token expired.
The function only returns this field when the
data.reason field is expired.
    Example: 1767225600

  - `data.error` (string)
    The error message. The function only returns this
field when the status check failed and the
data.reason field is error.
    Example: "The system could not read the token file."

  - `data.expires_in` (integer)
    The number of seconds until the stored token expires.
The function only returns this field when the token is
valid.
    Example: 780

  - `data.reason` (string)
    The machine-readable reason that the token is not
usable. The function only returns this field when the
data.valid field is 0.

It is one of the following values:
* no_token - The server does not store a token.
* parse_error - The system could not read or decode the stored token.
* missing_id_token - The stored token does not contain an identity token.
* missing_access_token - The stored token does not contain an access token, so the system cannot authenticate 360 Monitoring requests with it. Sign in again.
* unverified_token - The system stored the token before it verified identity token signatures, or the stored token has no readable expiry claim. Sign in again.
* expired - The stored token expired.
* error - The system failed to check the token. The data.error field contains the details.
    Example: "no_token"

  - `data.valid` (integer)
    * 1 - The server holds a valid WebPros authentication token.
* 0 - The server does not hold a valid WebPros authentication token. Check the data.reason field for more details.
    Enum: 0, 1

  - `metadata` (object)

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

  - `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


