Skip to main content
Completes a previously created username challenge. This endpoint consumes the challenge atomically, verifies both wallet signatures, logs in to Polymarket, creates the profile if needed, and sets the username.
Call this from your backend with the same PolyNode API key that created the challenge. Do not call it directly from the browser.

Request

Example

Response

Server checks

The endpoint:
  • loads and consumes the challenge atomically
  • requires the same PolyNode API key hash that created the challenge
  • requires exact address, username, action, and challenge id match
  • verifies the challenge is not expired
  • recovers the signer from the Polymarket SIWE signature
  • recovers the signer from the PolyNode consent typed-data signature
  • requires both recovered addresses to equal the challenge EOA
  • re-checks username availability unless the current profile already has that username

Errors