すべてのエンドポイント

開発者向け / StrawPoll API / Voting

Get a vote token

GET/forms/{slug}/vote-token

A vote token for one new response from a browser, sent in voteToken with POST /forms/{slug}/submit. The voting page gets one when it loads; this is for pages that show the poll elsewhere, and for a page whose token ran out after 12 hours. It belongs to the poll and the network it was fetched from. Known bots, scripts and AI agents are refused with automated.

ブラウザからはAPIキーなしで動作します。スクリプトはキーを送ります。

パラメーター

パス

  • slug string 必須 max. 20

    The form's public id, as in https://strawpoll.com/r/{slug}.

レスポンス

The token.

  • token string

試してみる

キーを作成

ブラウザからAPIへ直接送られ、ほかには送られません。「記憶する」をオンにすると、このタブを閉じるまで保持されます。 読み取り専用キーなら、何も変更せずに試せます。

GET https://new.strawpoll.com/api/v4/forms/{slug}/vote-token

キーを使ったリクエストは、プランの1日あたりのAPIリクエスト数に含まれます。