Get a new code for an agent registration
/agent/identity/claim
A new `user_code` and `verification_uri`, usually because the last code expired (the poll answered `expired_token`). Taken any time while the registration waits for its person: the new attempt replaces the current one, whose link and code stop working at once (auth.md mints a new identifier per attempt). `email` must equal the registration's `login_hint`. At most 5 attempts per registration, and 5 requests a minute per address. Errors are `{ error, message }`.
Request Body
Response Body
Seconds the code is good for (600).
Seconds to wait between polls.
6 digits.
The page the person opens to approve.
initiated
curl -X POST 'https://api.elaichi.ai/agent/identity/claim' \
-H 'Content-Type: application/json' \
-d '{"claim_token":"your_claim_token","email":"your_email"}'const body = {
"claim_token": "your_claim_token",
"email": "your_email"
};
const response = await fetch('https://api.elaichi.ai/agent/identity/claim', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/agent/identity/claim"
headers = {
"Content-Type": "application/json",
}
payload = {
"claim_token": "your_claim_token",
"email": "your_email"
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())