Authenticate using wallet
POST/auth/create_auth_token
Talent Protocol API Authentication
In order to perform write requests to the protocol apps need to authenticate their users using their wallets. This is achieved by prompting them to sign a message in return of an JWT token that our API will return after successful validation.
Flow:
- User needs to have a wallet connected to your app
- You need a Talent Protocol API key with write access. You can request one API key by opening a ticket on Discord.
- Then you need to call
auth/create_nonce
to get a nonce that needs to be used to sign a message. Check more about it here - After fetching the nonce the user needs to sign the following message:
Sign in with Talent Protocol\nnonce: <nonce>
. Replace<nonce>
with the nonce from the previous step. - Once you have a signed message you need to call
auth/create_auth_token
to get an auth token. Check more about it here - You can then store the auth token in the browser session and use it to call endpoints that require user authentication.
Auth Tokens expire after 15 days. It's possible to refresh them by issuing a new auth token by calling auth/refresh_auth_token
. . Check more about it here
Request
Responses
- 200
- 400
- 401
Authenticate using wallet
Bad request with bad signature
unauthorized request