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

# Generate a token

```c cURL
curl --request PUT \
     --url https://hostname/concerto/services/rest/RepositoryService/v1/Tokens \
# Add Authorization header to this snippet 
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --data '
{
     "tenant": "example",
     "userName": "joe@acme.com",
     "password": "secret!",
     "apiToken": "xxxxxxxx-229c-4fdc-95df-8075efa5d716"
}
'
```

```node Node
const fetch = require('node-fetch');

const url = 'https://hostname/concerto/services/rest/RepositoryService/v1/Tokens';
// Add Authorization header to this snippet 
const options = {
  method: 'PUT',
  headers: {Accept: 'application/json', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    tenant: 'example',
    userName: 'joe@acme.com',
    password: 'secret!',
    apiToken: 'xxxxxxxx-229c-4fdc-95df-8075efa5d716'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
```

```python Python
import requests

url = "https://hostname/concerto/services/rest/RepositoryService/v1/Tokens"

payload = {
    "tenant": "example",
    "userName": "joe@acme.com",
    "password": "secret!",
    "apiToken": "xxxxxxxx-229c-4fdc-95df-8075efa5d716"
}
# Add Authorization header to this snippet 
headers = {
    "Accept": "application/json",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

```json Response Example
{
  "token": "207828d9-229c-4fdc-95df-8075efa5d716"
}
```

# Specify a username

<!-- c@9 -->
<!-- node@10 -->
<!-- python@7 -->

Specify the existing CloudTest username.

# Specify your password

<!-- c@10 -->
<!-- node@11 -->
<!-- python@8 -->

Enter the password associated with your username.

# Specify the `apiToken`

<!-- c@11 -->
<!-- node@12 -->
<!-- python@9 -->

When the default tenant of the user account has SSO enabled, you need to send an apiToken instead of the username and password.

# Specify the tenant name

<!-- c@8 -->
<!-- node@9 -->
<!-- python@6 -->

You can specify a tenant that you want the token to belong to. If not specified, the token is applied to the default tenant.

# Call the API

<!-- c@1-12 -->
<!-- node@1-18 -->
<!-- python@1-18 -->

Call PUT on the request URL, providing the body request object.

# Get the response

<!-- c@13-15 -->
<!-- node@19-21 -->
<!-- python@19-21 -->

The response is a JSON object containing the token.