---
updatedAt: 2026-10-29T09:05:17.000Z
agentTools:
  projectIndex: https://cargoai.readme.io/llms.txt
---

# Get Token

This endpoint enables the retrieval of an authentication token and a redirection link for accessing the CargoMART portal.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "solutions",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.cargoai.co/solutions"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/users": {
      "get": {
        "summary": "Get Token",
        "description": "This endpoint enables the retrieval of an authentication token and a redirection link for accessing the CargoMART portal.",
        "operationId": "get-token",
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "description": "user's registered email",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "description": "account status of the user. Omitted when the status is not one of the listed values.",
                      "enum": [
                        "Activated",
                        "Manual activation",
                        "Pending validation",
                        "Pending company validation"
                      ]
                    },
                    "message": {
                      "type": "string",
                      "description": "result of the request"
                    },
                    "token": {
                      "type": "string",
                      "description": "authentication token for the CargoMART portal"
                    },
                    "link": {
                      "type": "string",
                      "description": "redirection link to the CargoMART portal, including the token"
                    }
                  }
                },
                "examples": {
                  "Activated": {
                    "value": {
                      "status": "Activated",
                      "message": "Successful request: please follow the link",
                      "token": "{{auth_token}}",
                      "link": "https://app.cargoai.co/forwarder/search/forwarder-search?auth={{auth_token}}"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "error code, returned only for some errors (for example `ALREADY_EXIST`)"
                    }
                  }
                },
                "examples": {
                  "User not found": {
                    "value": {
                      "error": "Invalid request: user not found: user@example.com"
                    }
                  },
                  "User not activated": {
                    "value": {
                      "error": "Invalid request: This user account is not activated yet."
                    }
                  },
                  "User not attached to API Key": {
                    "value": {
                      "error": "Invalid request: User is not attached to your key, please use create user endpoint to link user with your key: user@example.com"
                    }
                  },
                  "User Disabled": {
                    "value": {
                      "error": "Invalid request: user account actually disabled, please contact support for additionnal details"
                    }
                  },
                  "User deleted": {
                    "value": {
                      "error": "Invalid request: user not found, please use create user endpoint or contact support if user should have account"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "error message"
                    },
                    "code": {
                      "type": "string",
                      "description": "error code, returned only for some errors (for example `ALREADY_EXIST`)"
                    }
                  }
                },
                "examples": {
                  "API key not authorized": {
                    "value": {
                      "error": "Invalid request: api key not authorized to perform this request"
                    }
                  }
                }
              }
            }
          },
          "502": {
            "description": "502",
            "content": {
              "application/json": {
                "examples": {
                  "internal server error": {
                    "value": "{\n    \"message\": \"Internal server error\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "example": "Internal server error"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```