> ## Documentation Index
> Fetch the complete documentation index at: https://docs.methodfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an Element Token

export const ParamList = ({items = [], is_child = false}) => {
  return items.map(item => {
    const field_props = {
      id: Math.random().toString(),
      body: item.name,
      name: item.name,
      type: item.type,
      required: item.required
    };
    const enums = item.enums || [];
    const items = item.items || [];
    const has_items = items?.length > 0;
    const has_enums = enums?.length > 0;
    const should_default_open = item.defaultOpen || false;
    const render_child_item = () => {
      const child_props = {
        title: has_enums ? "Possible enum values" : "properties"
      };
      if (should_default_open) child_props.defaultOpen = true;
      const has_inline_enums = has_enums && enums.every(enum_item => typeof enum_item === 'string') && enums.map((enum_item, idx) => {
        const is_last = idx === enums.length - 1;
        const is_2nd_to_last = idx === enums.length - 2;
        return <>
            <code>{enum_item}</code>
            {is_last && ''}
            {is_2nd_to_last && ' or '}
            {!is_last && !is_2nd_to_last && ', '}
          </>;
      });
      const enum_list = has_enums && !has_inline_enums && <Accordion {...child_props}>
          {enums.map((enum_item, index) => <div key={`enum-${index}`}>
              <code>{enum_item.name}</code>
              <br />
              <p>{enum_item.description}</p>
            </div>)}
        </Accordion>;
      const item_list = has_items && <Expandable {...child_props}>
          <ParamList items={items || []} is_child />
        </Expandable>;
      return <>
          <p>
            {item.description}
            {has_inline_enums && [has_inline_enums.length > 1 ? ' One of ' : ' Must be ', ...has_inline_enums]}
          </p>

          {enum_list}
          {item_list}
        </>;
    };
    return is_child ? <ResponseField {...field_props}>{render_child_item()}</ResponseField> : <ParamField {...field_props}>{render_child_item()}</ParamField>;
  });
};

Element tokens are used as the starting point and authentication key to instantiate Method's embeddable UI components within your experience.

<Note>
  For security purposes, element tokens are for one-time use only, and expire after 30 minutes.
</Note>

## Body

The structure of the request body differs slightly depending on the type of Element you are trying to use. See the [Elements Guide](/elements/overview) for more information about specific flows.

<Note>
  Either `entity_id` or `connect.entity` is required.
</Note>

<ParamList
  items={[
{
name: `type`,
type: 'enum',
required: true,
description: 'The name of the element type you want to generate the token for.',
enums: ['connect', 'balance_transfer'],
},
{
name: 'entity_id',
type: 'string',
required: false,
description: 'An existing entity id that the Element session will initiate for.'
},
{
name: 'team_name',
type: 'string',
required: false,
description: 'The name of the team that will be displayed in the Element.'
},
{
name: 'team_logo',
type: 'string',
required: false,
description: 'A URL to an image that will be used as the logo in the Element.'
},
{
name: 'connect',
type: 'object',
required: false,
description: 'Information needed if creating a Connect Element token.',
items: [
  {
    name: 'products',
    type: 'enum',
    required: false,
    description: `The account products that you want to Connect this entity's accounts with.`,
    enums: ['balance', 'sensitive', 'payoff', 'transactions', 'update', 'payment'],
  },
  {
    name: 'accounts',
    type: 'array',
    required: false,
    description: (<>A list of accounts associated with the entity that you want to Connect (note <code>entity_id</code> must also be provided).</>),
  },
  {
    name: 'entity',
    type: 'object',
    required: false,
    description: (
      <>
        Information about the entity that the Element session will initiate for.
        See the <a href="/2026-03-30/reference/entities/create-individual">Individual Entity</a> page for information about fields in the individual object.
      </>
    ),
    items: []
  },
  {
    name: 'account_filters',
    type: 'object',
    required: false,
    description: 'Optional filters to restrict which liability types are shown or to restrict how many accounts the user can select.',
    items: [
      {
        name: 'liability_types',
        type: 'enum',
        required: false,
        description: `A list of liability types that should be shown for the user.`,
        enums: ['auto_loan', 'mortgage', 'credit_card', 'loan', 'student_loan', 'personal_loan'],
      },
      {
        name: 'selection_type',
        type: 'enum',
        required: false,
        description: `Indicates whether the user should be able to only select one or multiple accounts.`,
        enums: ['single', 'multiple'],
      },
    ]
  }
]
},
{
name: 'balance_transfer',
type: 'object',
required: false,
description: 'Information needed if creating a Balance Transfer Element token.',
items: [
  {
    name: 'flow_type',
    type: 'enum',
    required: true,
    description: 'The flow type.',
    enums: ['default'],
  },
  {
    name: 'payout_amount_min',
    type: 'number',
    required: true,
    description: 'The minimum amount that needs to be paid out per creditor.'
  },
  {
    name: 'minimum_loan_amount',
    type: 'number',
    required: true,
    description: 'The minimum loan amount that should be requested.'
  },
  {
    name: 'payout_residual_amount_max',
    type: 'number',
    required: true,
    description: 'The maximum residual amount that can be paid out, after payments to creditors.'
  },
  {
    name: 'loan_details_requested_amount',
    type: 'number',
    required: true,
    description: 'The amount of the loan that is requested.'
  },
  {
    name: 'loan_details_requested_rate',
    type: 'number',
    required: true,
    description: 'The interest rate of the loan that is requested.'
  },
  {
    name: 'loan_details_requested_term',
    type: 'number',
    required: true,
    description: 'The term of the loan that is requested.'
  },
  {
    name: 'loan_details_requested_monthly_payment',
    type: 'number',
    required: true,
    description: 'The monthly payment of the loan that is requested.'
  }
]
},
]}
/>

## Returns

The element token that was created.

<RequestExample>
  ```bash cURL theme={null}
  curl https://production.methodfi.com/elements/token \
    -X POST \
    -H "Method-Version: 2026-03-30" \
    -H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
    -H "Content-Type: application/json" \
    -d '{
      "type": "connect",
      "connect": {
        "products": ["balance"],
        "entity": {
          "type": "individual",
          "individual": {
            "first_name": "Kevin",
            "last_name": "Doyle"
          }
        }
      }
    }'
  ```

  ```javascript Node.js theme={null}
  const token = await method.elements.token.create({
    type: "connect",
    connect: {
      products: ["balance"],
      entity: {
        type: "individual",
        individual: {
          first_name: "Kevin",
          last_name: "Doyle"
        }
      }
    }
  });
  ```

  ```python Python theme={null}
  token = method.elements.token.create({
    'type': 'connect',
    'connect': {
      'products': ['balance'],
      'entity': {
        'type': 'individual',
        'individual': {
          'first_name': 'Kevin',
          'last_name': 'Doyle'
        }
      }
    }
  })
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "element_token": "pk_elem_qPmypE9wwphr3WL3yTj7JhxjrPzAmK8G"
  }
  ```
</ResponseExample>
