Missing token
Missing token
Missing kya token
When KYA is enforced by default for all agentic and bot traffic on bot and fraud detection engines, a new AI agent may initially not be aware of the requirement and send a request without any KYA tokens. As seen in Figure 2, the bot management solution that detects bot/agentic activity returns a 401 HTTP status code with a message in the body containing instructions on how to register with the preferred agent ID provider for the site.
- The initial request from the agent is missing the kya token
- The bot or fraud detection engine protecting the website detects the bot activity and is unable to find the
kyatoken. - The detection engine returned a
401 - UnauthorizedHTTP response code with a custom message in the body: See below - A custom HTTP headers:
skyfire-outcome: Token missing
- The detection engine returned a
- The Buyer Agent calls the Skyfire API (https://api.skyfire.xyz/api/v1/tokens) to generate a
kyatoken. - If the API key is valid, the Skyfire agent identity provider generates a token according to the criteria defined in the request
- The agent request the protected resource with the new valid token
- The bot manager or fraud detection engine protecting the website validate the token, extracts the agent and platform identity claims, classify the traffic and allows it to proceed to the protected web resource
- The web server returns the requested content to the agent.
Missing Token Error Response
{
"error": "Missing `kya` token in the skyfire-pay-id header. Please create an account at https://app.skyfire.xyz, create a `kya` token - https://docs.skyfire.xyz/reference/create-token, and include it in the skyfire-pay-id header with your next request"
}
Fig. 2: workflow with missing kya token
Missing pay token
If the agent attempts to make a purchase but the request is missing a pay token, the workflow is is similar to the one described in the case of a missing kya token, expect the HTTP status code and message differ in step 2.a:
HTTP status code: 402 - Payment required
Message:
{
"error": "Missing `pay` token in the skyfire-pay-id header. Please create an account at https://app.skyfire.xyz, create a `pay` token - https://docs.skyfire.xyz/reference/create-token and include the token it in the skyfire-pay-id header with your next request."
}
Missing kya+pay token
To allow an agent to make a purchase, a kya+pay in most cases is required and and should include the payment credential, the agent and its platform identity but also the user’s contact information including shipping address. To instruct the agent how to correct the issue, the workflow is is similar to the one described in the case of a missing kya token, expect the HTTP status code and message differ in step 2.a:
HTTP status code: 401 - Unauthorized
Message:
{
"error": "Missing `kya+pay` token in the skyfire-pay-id header. Please create an account at https://app.skyfire.xyz, create a `kya+pay` token - https://docs.skyfire.xyz/reference/create-token and include it in the skyfire-pay-id header with your next request."
}