すべてのエンドポイント

開発者向け / StrawPoll API / Voting

Verify a voter's email

POST/forms/{slug}/verify

For forms limited to one response per email address. { "action": "send", "email" } emails a 6-digit code; { "action": "verify", "email", "code" } confirms it for this browser. Then submit as usual.

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

パラメーター

パス

  • slug string 必須 max. 20

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

リクエストボディ application/json

  • action string 必須

    指定できる値: send verify

  • email string (email) 必須
  • code string
  • voteToken string

    With send: the vote token, see GET /forms/{slug}/vote-token. Without one, the request gets the CAPTCHA.

  • captchaToken string

    With send: a solved CAPTCHA, once a captcha error asked for one.

レスポンス

{ "sent": true, "resendIn": 60 } or { "verified": true }.

試してみる

キーを作成

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

POST https://new.strawpoll.com/api/v4/forms/{slug}/verify

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