---
updatedAt: 2026-03-01T18:51:14.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/cloudtest/llms.txt
---

# Generate a token

Authenticates and generates a token. The security token expires after five hours of inactivity.

# OpenAPI definition

```json
{
  "externalDocs": {
    "description": "See documentation for Akamai's CloudTest API",
    "url": "https://techdocs.akamai.com/cloudtest/reference"
  },
  "info": {
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "title": "Tokens",
    "version": "v1"
  },
  "openapi": "3.0.0",
  "paths": {
    "/RepositoryService/v1/Tokens": {
      "put": {
        "description": "Authenticates and generates a token. The security token expires after five hours of inactivity.",
        "externalDocs": {
          "description": "See documentation for this operation in Akamai's CloudTest API",
          "url": "https://techdocs.akamai.com/cloudtest/reference/put-token"
        },
        "operationId": "put-token",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "password": "secret!",
                "userName": "joe@acme.com"
              },
              "schema": {
                "additionalProperties": false,
                "description": "Configuration for generating a token.",
                "properties": {
                  "apiToken": {
                    "description": "When the default tenant of the user account has SSO enabled, you need to send an `apiToken` instead of the `username` and `password`.",
                    "example": "xxxxxxxx-229c-4fdc-95df-8075efa5d716",
                    "type": "string"
                  },
                  "password": {
                    "description": "The password.",
                    "type": "string"
                  },
                  "tenant": {
                    "description": "The optional tenant.",
                    "type": "string"
                  },
                  "userName": {
                    "description": "The username.",
                    "type": "string"
                  }
                },
                "required": [
                  "userName",
                  "password",
                  "apiToken"
                ],
                "type": "object",
                "x-akamai": {
                  "file-path": "schemas/get-token.yaml"
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "example": {
                  "token": "207828d9-229c-4fdc-95df-8075efa5d716"
                },
                "schema": {
                  "additionalProperties": false,
                  "description": "A JSON object, containing the token.",
                  "properties": {
                    "token": {
                      "description": "The security token to use in all subsequent requests.",
                      "type": "string"
                    }
                  },
                  "required": [
                    "token"
                  ],
                  "type": "object",
                  "x-akamai": {
                    "file-path": "schemas/token-200.yaml"
                  }
                }
              }
            },
            "description": "A JSON object, containing the token."
          },
          "400": {
            "content": {},
            "description": "[Bad request](ref:400). The URL or JSON request object is invalid.",
            "x-akamai": {
              "file-path": "errors/400.yaml"
            }
          },
          "401": {
            "content": {},
            "description": "[Unauthorized](ref:401). The security token is missing or invalid. See [Get started](ref:get-started) for help initially running the API.",
            "x-akamai": {
              "file-path": "errors/401.yaml"
            }
          },
          "403": {
            "content": {},
            "description": "[Forbidden](ref:403). The authenticated user does not have access to this resource.",
            "x-akamai": {
              "file-path": "errors/403.yaml"
            }
          },
          "500": {
            "content": {},
            "description": "[Internal server error](ref:500). Try again later.",
            "x-akamai": {
              "file-path": "errors/500.yaml"
            }
          }
        },
        "summary": "Generate a token",
        "tags": [
          "Tokens"
        ]
      },
      "x-akamai": {
        "file-path": "paths/tokens.yaml",
        "path-info": "/RepositoryService/v1/Tokens"
      }
    }
  },
  "servers": [
    {
      "url": "https://{hostname}/concerto/services/rest"
    }
  ],
  "x-akamai": {
    "auth-type": "OAUTH",
    "file-path": "12-token.yaml"
  },
  "x-readme": {
    "samples-languages": [
      "curl",
      "python",
      "node"
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```

# Sibling pages

* [Delete a token](https://techdocs.akamai.com/cloudtest/reference/delete-token.md)