---
search:
  tags:
    - agent-logins
    - POST
seo:
  description: >-
    Exchanges the token of a handoff link made on
    https://my.pols.so/account/agents… Reference for the POST
    /v1/agent-logins/handoff endpoint in the pols.so API.
sidebar:
  label: Redeem a one-time agent handoff link for an API key (no API key needed)
  badge: POST
title: Redeem a one-time agent handoff link for an API key (no API key needed)
type: openapi-operation
---
Exchanges the token of a handoff link made on
`https://my.pols.so/account/agents` (the part after `#` in
`https://my.pols.so/agent/handoff#<token>`) for a new API key, this
once. The key acts as the person who made the link, in its org,
and has the scope they chose: the whole org, or only some of its
sandboxes (those still there now). It is named
`created by agent on <date>`, with the link's label, and revocable
on the account page like any other.

A link works once and for 15 minutes after it was made, until it
is revoked. A token that is unknown, used, expired or revoked fails
with 400 `expired_token`, alike, and counts as a failed
authentication of the client. Other errors: `access_denied` (403,
the person may no longer get keys in that org: they left it, or it
is disabled; or the sandboxes the link was limited to were all
deleted) and `quota_exceeded` (403, the org has as many API
keys as it may; the link stays usable, so redeem again once one is
revoked). Each client address may try 20 redemptions an hour, and
each link 5 (429 `rate_limited`).

`POST /v1/agent-logins/handoff`
