Crypto Wallet

Authenticatestart

Changed on

Initiate the authentication of a crypto wallet. After calling this endpoint, the user will need to sign a message containing the returned challenge field.

For Ethereum crypto wallets, you can optionally use the Sign In With Ethereum (SIWE) protocol for the message by passing in the siwe_params. The only required fields are domain and uri. If the crypto wallet detects that the domain in the message does not match the website's domain, it will display a warning to the user.

If not using the SIWE protocol, the message will simply consist of the project name and a random string.

post/v1/crypto_wallets/authenticate/start

Request

  • Base URL
    https://api.stytch.com
  • Auth
    HTTP basic

Request body

crypto_wallet_typestring required

The type of wallet to authenticate. Currently ethereum and solana are supported. Wallets for any EVM-compatible chains (such as Polygon or BSC) are also supported and are grouped under the ethereum type.

crypto_wallet_addressstring required

The crypto wallet address to authenticate.

user_idstring

The unique ID of a specific User. You may use an external_id here if one is set for the user.

session_tokenstring

The session_token associated with a User's existing Session.

session_jwtstring

The session_jwt associated with a User's existing Session.

Response

Successful response

request_idstring required

Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.

user_idstring required

The unique ID of the affected User.

challengestring required

A challenge string to be signed by the wallet in order to prove ownership.

user_createdboolean required

In login_or_create endpoints, this field indicates whether or not a User was just created.

status_codeinteger required

The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.

Changes