Users
Start a session
This endpoint registers a user or starts a session of a already registered user via Google, e-mail or sms.
POST
/
sessions
Body
curl --request POST \
--url https://protocol-staging.int.lumx.io/v1/sessions \
--header 'Content-Type: application/json' \
--data '{
"clientId": "<string>",
"method": "email",
"email": "<string>",
"phone": "<string>",
"accessToken": "<string>"
}'
{
"token": "<string>",
"account": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"avatarUrl": "<string>",
"walletAddress": "<string>",
"birthDate": "2023-11-07T05:31:56Z",
"cpf": "<string>"
}
}
Body
application/json
clientId
string
requiredIdentifies to which client the action is attached. Don't have a clientId yet? Request one.
method
enum<string>
requiredSign-up method used to create a new user.
Available options:
email
, google
, phone
email
string
The e-mail of the user. Required when the method is email.
phone
string
The phone number of the user. Required when the method is phone. Format "+55 11 99999-9999"
accessToken
string
The access token provided by Google OAuth. Required when method is google.
Response
201 - application/json
token
string
The user's auth token.
account
object
curl --request POST \
--url https://protocol-staging.int.lumx.io/v1/sessions \
--header 'Content-Type: application/json' \
--data '{
"clientId": "<string>",
"method": "email",
"email": "<string>",
"phone": "<string>",
"accessToken": "<string>"
}'
{
"token": "<string>",
"account": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"avatarUrl": "<string>",
"walletAddress": "<string>",
"birthDate": "2023-11-07T05:31:56Z",
"cpf": "<string>"
}
}