Generate Magic Link
POST
/api/v1/auth/magic-link/generate
const url = 'https://api.qeychain.xyz/api/v1/auth/magic-link/generate';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"external_user_id":"example","email":"hello@example.com","name":"example","wallet_address":"example","client_name":"example","clients":[{"name":"example","wallets":["example"]}],"default_client_name":"example","default_wallet_address":"example","source":"example","timestamp":1,"signature":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.qeychain.xyz/api/v1/auth/magic-link/generate \ --header 'Content-Type: application/json' \ --data '{ "external_user_id": "example", "email": "hello@example.com", "name": "example", "wallet_address": "example", "client_name": "example", "clients": [ { "name": "example", "wallets": [ "example" ] } ], "default_client_name": "example", "default_wallet_address": "example", "source": "example", "timestamp": 1, "signature": "example" }'Generate a one-time magic link URL for partner SSO.
Called server-to-server by partner backends (e.g., TAIP). The request body must include a valid HMAC-SHA256 signature.
Signature message format:
- With wallet: external_user_id + email + wallet_address + source + timestamp
- Without wallet: external_user_id + email + source + timestamp
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
MagicLinkGenerateRequest
Request from partner backend to generate a magic link.
object
external_user_id
required
External User Id
string
email
required
Email
string format: email
clients
Any of:
Array<object>
ClientWalletsSchemaA client and their associated wallet addresses.
object
name
required
Name
string
wallets
required
Wallets
Array<string>
null
source
required
Source
string
timestamp
required
Timestamp
Unix timestamp of request
integer
signature
required
Signature
HMAC-SHA256 signature
string
Examplegenerated
{ "external_user_id": "example", "email": "hello@example.com", "name": "example", "wallet_address": "example", "client_name": "example", "clients": [ { "name": "example", "wallets": [ "example" ] } ], "default_client_name": "example", "default_wallet_address": "example", "source": "example", "timestamp": 1, "signature": "example"}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Examplegenerated
exampleValidation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}