Verify Magic Link
POST
/api/v1/auth/magic-link/verify
const url = 'https://api.qeychain.xyz/api/v1/auth/magic-link/verify';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"token":"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/verify \ --header 'Content-Type: application/json' \ --data '{ "token": "example" }'Verify a magic link token, create/find user, link wallet, set auth cookies.
Called by the frontend when the user lands on /magic-login?token=xxx. Returns user info + wallet_address for the frontend to redirect to the dashboard.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
VerifyEmailRequest
object
token
required
Token
string
Examplegenerated
{ "token": "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" } ]}