Authenticating as a company user

Edit on GitHub
You are browsing a previous version of the document. The latest version is undefined.

This endpoint allows authenticating as a company user.


For detailed information on the modules that provide the API functionality and related installation instructions, see Glue API: Company Account Feature Integration.

Authenticate as a company user

To authenticate as a company user, send the request:

POST /company-user-access-tokens

Header key Required Description
Authorization Alphanumeric string that authorizes the customer to send requests to protected resources. Get it by authenticating as a customer.


Request sample:


    "data": {
        "type": "company-user-access-tokens",
        "attributes": {
            "idCompanyUser": "5daf27b3-eddf-5b81-98cb-899f140f97e5"
Attribute Type Description
idCompanyUser String Unique identifier of a company user to authenticate as. To get it, Retrieve available company users.


Response sample
    "data": {
        "type": "company-user-access-tokens",
        "id": null,
        "attributes": {
            "tokenType": "Bearer",
            "expiresIn": 28800,
            "accessToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUz",
            "refreshToken": "def50200d7338763c798a0600f18e"
        "links": {
            "self": ""
Attribute Type Description
tokenType String Token type. The default value is Bearer.
accessToken String Authentication token used to send requests to the protected resources available for the company user.
expiresIn Integer Time in seconds in which the token expires. The default value is 28800.
refreshToken String Token used to refresh the accessToken.

Possible errors

Code Reason
001 Failed to authenticate a user. This can happen due to the following reasons:
  • Current authenticated customer cannot authenticate as the specified company user;
  • Specified company user does not exist;
  • Authentication token provided in the request is incorrect.
002 Authentication token is missing in the request.
901 Company user Id format is incorrect.

To view generic errors that originate from the Glue Application, see Reference information: GlueApplication errors.

Next steps