On this page

    1. Home
    2. API
    3. API Reference
    4. Wallet
    5. Wallet Circle Init

    Wallet Circle Init

    This endpoint initializes a session with Circle's Programmable Wallets service. It returns the necessary tokens and encryption keys required to perform sensitive wallet operations (like creating a PIN or answering security questions) using the Circle SDK.


    POST /wallet/circle-init

    Initialize a Circle wallet session. This is required before performing on-chain operations that require user interaction via the Circle UI components.

    Request

    POST /wallet/circle-init

    Headers:

    {
      "Host": "api.bringyour.com",
      "Authorization": "Bearer YOUR_JWT_TOKEN",
      "Accept": "application/json"
    }

    Response

    200 Success

    Status: 200 OK

    Content-Type: application/json

    {
      "user_token": {
        "user_token": "string",
        "encryption_key": "string"
      },
      "challenge_id": "string",
      "error": {
        "message": "string"
      }
    }

    Fields

    FieldTypeDescription
    user_tokenobjectSession tokens for the Circle SDK.
    user_token.user_tokenstringThe Circle user session token.
    user_token.encryption_keystringThe key used to encrypt user inputs in the Circle SDK.
    challenge_idstringThe ID of the challenge that needs to be solved (e.g., initial PIN setup).
    errorobjectPresent if initialization failed.
    error.messagestringHuman-readable explanation of the error.

    Example

    HTTP Request

    POST /wallet/circle-init HTTP/1.1
    Host: api.bringyour.com
    Authorization: Bearer YOUR_JWT_TOKEN
    Accept: application/json

    Successful HTTP Response

    {
      "user_token": {
        "user_token": "eyJraWQiOiI...truncated",
        "encryption_key": "MIIBIjANBg...truncated"
      },
      "challenge_id": "8db2938a-0000-4fac-88bc-000000000000",
      "error": null
    }


    Powered by Sudoc v2.5.0
    Hide table of contents