installs_poll
POST
/consent/token
const url = 'https://api.canopyhq.dev/consent/token';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"poll_secret":"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.canopyhq.dev/consent/token \ --header 'Content-Type: application/json' \ --data '{ "poll_secret": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
poll_secret
required
What the vendor polls with. Issued once with the proposal; stored hashed.
string
Examplegenerated
{ "poll_secret": "example"}Responses
Section titled “Responses”Pending, expired, an initial grant with its key, or an update grant with no key. An update receipt remains pollable for the proposal’s ten-minute lifetime.
The response body names the invalid field and reason.
No proposal answers this poll secret.
The key was collected already.