Create integration token
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', expiresAt: '2023-11-07T05:31:56Z'})
};
fetch('https://blackbox.dasha.ai/api/v1/web-integrations/{integrationId}/tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://blackbox.dasha.ai/api/v1/web-integrations/{integrationId}/tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://blackbox.dasha.ai/api/v1/web-integrations/{integrationId}/tokens"
payload = {
"name": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"tokenId": "<string>",
"token": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Create integration token
Generates a new access token for the web integration. Tokens are used to authenticate external systems accessing the integration.
POST
/
api
/
v1
/
web-integrations
/
{integrationId}
/
tokens
Create integration token
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', expiresAt: '2023-11-07T05:31:56Z'})
};
fetch('https://blackbox.dasha.ai/api/v1/web-integrations/{integrationId}/tokens', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://blackbox.dasha.ai/api/v1/web-integrations/{integrationId}/tokens \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://blackbox.dasha.ai/api/v1/web-integrations/{integrationId}/tokens"
payload = {
"name": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"tokenId": "<string>",
"token": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"expiresAt": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Path Parameters
Integration identifier
Body
application/jsontext/jsonapplication/*+json
Token configuration
Response
Integration token created successfully
Response containing newly created access token
Unique token identifier
Minimum string length:
1Access token value. Store this securely as it cannot be retrieved later.
Minimum string length:
1Token name for identification purposes
Minimum string length:
1Token creation timestamp
Token expiration timestamp. If null, the token never expires.
Was this page helpful?