Users

Pre-generate a user with embedded accounts.

Changed on

Pre-generate a user with one or more embedded accounts before they authenticate. Creates a user record and an embedded account per entry in accounts, each with its own SSS key shares. When the user later authenticates (via email, OAuth, third-party auth, etc.) with the same identifier, they will be linked to these pre-generated accounts.

Use the accounts array to pregenerate accounts on different chain types (e.g. one EVM account and one SVM account) in a single call.

You can pregenerate using either:

  • email: User will be linked when they authenticate with the same email
  • thirdPartyUserId + thirdPartyProvider: User will be linked when they authenticate via the same third-party provider
post/v2/users/pregenerate

Request

  • Base URL: https://api.openfort.io
  • URL: https://api.openfort.io/v2/users/pregenerate
  • Auth: HTTP bearer

Request body

emailstring

The email address of the user to pregenerate. Required if thirdPartyUserId is not provided.

thirdPartyUserIdstring

The third-party user ID from an external auth provider (Firebase, Supabase, etc.). Required if email is not provided.

thirdPartyProvider'accelbyte' | 'firebase' | 'lootlocker' | 'playfab' | 'supabase' | 'custom' | 'oidc' | 'better-auth'

Enum of the supporting third party auth providers.

Example request

{
  "email": "user@example.com",
  "thirdPartyUserId": "firebase_uid_abc123",
  "accounts": [
    {
      "accountType": "Externally Owned Account",
      "chainType": "EVM",
      "chainId": 137,
      "implementationType": "Calibur"
    }
  ]
}

Response

User and accounts pre-generated successfully.

userstring required

User uuid (starts with usr_).

Example response

{
  "accounts": [
    {
      "custody": "Developer"
    }
  ]
}

Changes

    • info

      added the required property // to the response with the status

    • breaking

      added the new required request property

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • breaking

      removed the required property from the response with the status

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      the security scope users:write was added to the endpoint's security scheme sk

    • info

      added the required property to the response with the status