---
agentTools:
  projectIndex: https://cargodocs-issuer.readme.io/llms.txt
---

# Get Token

Developers can utilize this endpoint to generate authentication token which is used to execute the remaining endpoints throughout the API.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "3.0.0",
    "title": "CargoDocs Issuer API",
    "description": "This API have endpoints  For Liner Cos, NVOCCs & future Warehouses wishing to create/issue original electronic bills of lading.",
    "termsOfService": "https://www.essdocs.com/policies/",
    "contact": {
      "name": "CargoDocs API Team",
      "email": "api@essdocs.com",
      "url": "https://www.essdocs.com"
    }
  },
  "servers": [
    {
      "description": "Sandbox API",
      "url": "https://api-test.cargodocs.com/v3/"
    },
    {
      "description": "Production API",
      "url": "https://api.cargodocs.com/api/v3/"
    }
  ],
  "externalDocs": {
    "description": "Find out more about essCargoDocs",
    "url": "https://cargodocs-issuer.readme.io"
  },
  "tags": [
    {
      "name": "First API Call",
      "description": "Endpoints under this category is the Generate Token which is usually required for every endpoint call untill it is not expired."
    }
  ],
  "paths": {
    "/common/oauth2/token": {
      "get": {
        "description": "Developers can utilize this endpoint to generate authentication token which is used to execute the remaining endpoints throughout the API.",
        "operationId": "get_token",
        "summary": "Get Token",
        "tags": [
          "First API Call"
        ],
        "security": [
          {
            "BasicAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Token"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "500": {
            "description": "Internal Server Error"
          },
          "503": {
            "description": "Service Unavailable"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BasicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    },
    "schemas": {
      "Token": {
        "properties": {
          "token": {
            "type": "string",
            "description": "Authentication token",
            "example": "eyJraWQiOiJ3YitJMjNzOWRCNUh0cjBhQXVwTHVjeFwvUFhWREhlVEcyQWpTNnkyNFBjYz0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI0ODIxMzU2OC1lYTRjLTRlYTItYWJhMi0wMWRmOGRmZmJjZTMiLCJkZXZpY2Vfa2V5IjoiZXUtd2VzdC0xXzE1NDA1N2EyLWE0OTItNDNjMi04MjUzLTEyZjlkMDEyNDA0OCIsImV2ZW50X2lkIjoiNmQ3MDExYWYtNTg5OS00MWUyLWJiZGQtNjgyMGY5ZTc1NmY3IiwidG9rZW5fdXNlIjoiYWNjZXNzIiwic2NvcGUiOiJhd3MuY29nbml0by5zaWduaW4udXNlci5hZG1pbiIsImF1dGhfdGltZSI6MTY0NTgwOTcyNiwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLmV1LXdlc3QtMS5hbWF6b25hd3MuY29tXC9ldS13ZXN0LTFfSnN6bUZoejRoIiwiZXhwIjoxNjQ1ODEzMzI2LCJpYXQiOjE2NDU4MDk3MjYsImp0aSI6IjJmMzI1YmEwLTI0MmYtNGI0ZC1iYzZmLWJiNTBjZTAyNDAyMSIsImNsaWVudF9pZCI6IjNwZHZrbWEzdDM5bnNxamFyamlmM2k0ZmlkIiwidXNlcm5hbWUiOiJWb2x0cm9uIn0.Pe9mQAM_HBiyJviY18tPRZNz1mB7x--l_bEAUQbyjuOH9EtnINOSMawEr2J5zhwAPFlZtsNbhJtGRhO53xl1aloF6EhQ24F-iK6rl21dXJBMXOHa8fBdUO_jLNSh4OxiDpBdVtIxmTBA6Bh13E989C6LT2Pd44fw7zdaHPVeLRI075MxlQriOXabow5rVF93-IFPW1oOQTNAQ-J7jCPvTAFX3n_6iv-ra9QajC43psU14RwunhZCne_8GFpjNtTOtupQ9tXnIjNBXX5cNYJtS52KlxcTKvxZ7B4tzLvh3a1u_M4Clzvcj1APSqsbM2eddYYKHHvEl-qI62eWaCbiVA"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 102,
      "1": 38,
      "2": 82,
      "3": 93,
      "4": 221,
      "5": 90,
      "6": 130,
      "7": 0,
      "8": 49,
      "9": 239,
      "10": 21,
      "11": 200
    }
  }
}
```