Login
POST
/v1/auth/login
const url = 'https://api.parasta.io/v1/auth/login';const options = { method: 'POST', headers: {'X-Device-Id': 'example', 'Content-Type': 'application/json'}, body: '{"passToken":"example","method":"pin","credential":{"pin":"example","passkeyResponse":{}}}'};
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.parasta.io/v1/auth/login \ --header 'Content-Type: application/json' \ --header 'X-Device-Id: example' \ --data '{ "passToken": "example", "method": "pin", "credential": { "pin": "example", "passkeyResponse": {} } }'Parameters
Section titled “ Parameters ”Header Parameters
Section titled “Header Parameters ” X-Device-Id
required
string
Device identifier generated as UUIDv4 on the client’s first launch.
Request Body required
Section titled “Request Body required ” Media type application/json
object
passToken
Required for first login on a new device.
string
method
required
string
credential
required
object
pin
Hashed PIN value
string
passkeyResponse
object
key
additional properties
any
Responses
Section titled “ Responses ”OK
Media type application/json
object
accessToken
required
string
refreshToken
required
string
expiresIn
required
integer
user
required
object
id
string
name
string
status
string
sessionReplaced
Whether the prior session was forcibly terminated.
boolean
Example
{ "user": { "status": "active" }}Authentication failed / unregistered device
Media type application/json
object
code
required
Error code prefixed with the service namespace (AUTH_, ACCOUNT_, WALLET_, DID_, ASSET_, TRANSFER_, EXCHANGE_).
string
message
required
string
details
object
key
additional properties
any
Example generated
{ "code": "example", "message": "example", "details": {}}Account suspended
Media type application/json
object
code
required
Error code prefixed with the service namespace (AUTH_, ACCOUNT_, WALLET_, DID_, ASSET_, TRANSFER_, EXCHANGE_).
string
message
required
string
details
object
key
additional properties
any
Example generated
{ "code": "example", "message": "example", "details": {}}Account locked
Media type application/json
object
code
required
Error code prefixed with the service namespace (AUTH_, ACCOUNT_, WALLET_, DID_, ASSET_, TRANSFER_, EXCHANGE_).
string
message
required
string
details
object
key
additional properties
any
Example generated
{ "code": "example", "message": "example", "details": {}}