Skip to main content

Create element token

Creates an element token to launch an Auth Element session for a specific entity. Element tokens are only valid for 30 minutes after they are created, and can only be used once.

Parameters


entity_id

string
The id of the end user (entity) for which the element_token will be created.

Required


team_name

string
The name used to refer to your company/app throughout the auth flow.

Required


type

enum
The type of element you wish to launch.
Possible enum values

auth

Required


auth

object
Auth element information.

Required


POST /elements/token
curl https://production.methodfi.com/elements/token \
-X POST \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
-H "Content-Type: application/json" \
-d '{
"entity_id": "ent_au22b1fbFJbp8",
"team_name": "Demo Auth App",
"type": "auth",
"auth": {}
}'
RESPONSE
{
"element_token": "pk_elem_f3TZsKnmP7Q69bX65hRHngBEb8mT8gbG"
}