Mint a short-lived hosted buyer-agent runtime token
curl --request POST \
--url https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/runtime-token \
--header 'Content-Type: application/json' \
--header 'X-Hosted-Buyer-Agent-Orchestrator: <api-key>' \
--data '
{
"installationId": "<string>",
"generation": "<string>"
}
'import requests
url = "https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/runtime-token"
payload = {
"installationId": "<string>",
"generation": "<string>"
}
headers = {
"X-Hosted-Buyer-Agent-Orchestrator": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Hosted-Buyer-Agent-Orchestrator': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({installationId: '<string>', generation: '<string>'})
};
fetch('https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/runtime-token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"accessToken": "<string>",
"tokenType": "Bearer",
"expiresAt": "2023-11-07T05:31:56Z"
},
"error": null
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Buyer Agent Principals
Mint a short-lived hosted buyer-agent runtime token
The deployment-authenticated hosted runtime orchestrator mints an identity-only bearer token for an active buyer-agent principal. The token carries only principal identity, organization identity, optional installation/generation, and expiry; it never carries advertiser access, grants, roles, or permissions. Human sessions, API keys, WorkOS M2M credentials, and runtime tokens are refused. A suspended or retired principal cannot mint a token.
POST
/
buyer-agent-principals
/
{principalId}
/
runtime-token
Mint a short-lived hosted buyer-agent runtime token
curl --request POST \
--url https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/runtime-token \
--header 'Content-Type: application/json' \
--header 'X-Hosted-Buyer-Agent-Orchestrator: <api-key>' \
--data '
{
"installationId": "<string>",
"generation": "<string>"
}
'import requests
url = "https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/runtime-token"
payload = {
"installationId": "<string>",
"generation": "<string>"
}
headers = {
"X-Hosted-Buyer-Agent-Orchestrator": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Hosted-Buyer-Agent-Orchestrator': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({installationId: '<string>', generation: '<string>'})
};
fetch('https://api.interchange.io/api/v2/buyer-agent-principals/{principalId}/runtime-token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"accessToken": "<string>",
"tokenType": "Bearer",
"expiresAt": "2023-11-07T05:31:56Z"
},
"error": null
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Authorizations
Deployment-injected hosted runtime orchestrator credential.
Path Parameters
Pattern:
^prin_[A-Za-z0-9_-]{32}$Body
application/json