Ask who a visitor has proved they are
const url = 'https://api.ebitex.io/audience/delivery/v1/visitors/identity';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"visitor":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.ebitex.io/audience/delivery/v1/visitors/identity \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "visitor": "example" }'For your server. After a visitor follows the emailed sign-in link, this tells you which person they proved they are, and the address the link was sent to, so your own back end can attach what the visitor did (an order, say) to that person and show them only their own. Send { "visitor": "v1.…" }.
It answers only from a live emailed-link proof, never from a link a form made, never from recognition, and never from anything a visitor typed, so someone who typed a stranger’s email into a form is not reported as that stranger. The emails are the addresses the proof covers (the one the link was mailed to), not every address the person holds. A person who was merged into another is reported as the person they became.
A device with no proof, an expired proof, another organization’s token, a revoked device and a token that does not verify all answer the same 200 with proven: false, so the route cannot be used to find out which tokens are real. It needs a key with the audience.delivery.identity scope and no origin or IP restriction: a browser-safe key is refused, whatever it sends, because it would put a person’s id and address in a page. The response is private, no-store.
Key: audience.delivery.identity
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Responses
Section titled “ Responses ”{ "proven": true, "individuals": [ { "id": "…", "emails": [ "ada@example.com" ] } ] }, or { "proven": false, "individuals": [] }.
invalid_api_key: the key is missing, revoked, expired or not an Audience delivery key.
missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired.
scope_denied: the key lacks audience.delivery.identity, or has an origin or IP restriction. app_not_available.
scope_denied: the key lacks this route’s scope. origin_denied or ip_denied: a browser-safe key was used from an origin or address outside its restrictions. app_not_available: Content is not enabled for the organization.
The body is larger than 16 KiB.
rate_limited: the key’s per-minute budget is spent; Retry-After says when it resets.
Quota exceeded; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.