Creating a new session
First, create a new Opal Token with your desired configuration. This will create a new session.Resuming an existing session
To resume an existing session, create a new token by passing thesession_id from a previous session
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl https://production.methodfi.com/opal/token \
-X POST \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
-H "Content-Type: application/json" \
-d '{
"mode": "card_connect",
"entity_id": "ent_fc92i43kc34",
"card_connect": {
"selection_type": "single"
}
}'
{
"success": true,
"data": {
"token": "otkn_THpBacqVBBrDkfqUf9htjm4QWAEJLY9a",
"valid_until": "2025-05-08T22:21:40.312Z",
"session_id": "osess_zde3mW34pEHqV"
},
"message": null
}
Maintain state and user data across Opal interactions.
curl https://production.methodfi.com/opal/token \
-X POST \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
-H "Content-Type: application/json" \
-d '{
"mode": "card_connect",
"entity_id": "ent_fc92i43kc34",
"card_connect": {
"selection_type": "single"
}
}'
{
"success": true,
"data": {
"token": "otkn_THpBacqVBBrDkfqUf9htjm4QWAEJLY9a",
"valid_until": "2025-05-08T22:21:40.312Z",
"session_id": "osess_zde3mW34pEHqV"
},
"message": null
}
curl https://production.methodfi.com/opal/token \
-X POST \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
-H "Content-Type: application/json" \
-d '{
"mode": "card_connect",
"entity_id": "ent_fc92i43kc34",
"card_connect": {
"selection_type": "single"
}
}'
{
"success": true,
"data": {
"token": "otkn_THpBacqVBBrDkfqUf9htjm4QWAEJLY9a",
"valid_until": "2025-05-08T22:21:40.312Z",
"session_id": "osess_zde3mW34pEHqV"
},
"message": null
}
session_id from a previous session
curl https://production.methodfi.com/opal/token \
-X POST \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
-H "Content-Type: application/json" \
-d '{
"session_id": "osess_zde3mW34pEHqV"
}'
{
"success": true,
"data": {
"token": "otkn_THpBacqVBBrDkfqUf9htjm4QWAEJLY9a",
"valid_until": "2025-05-08T22:21:40.312Z",
"session_id": "osess_zde3mW34pEHqV"
},
"message": null
}