Login version v3
https://client-api.{environment}/api/login/v3
- environment: required(one of magine.com, tvoli.com - default: magine.com)
Authentication and signup
Signup
Authenticate
put /auth/email
Signup
Headers
- Magine-AccessToken: required(string)
A token that identifies a specific partner
Example:
25b70ae1-d2bd-4ae7-85f4-62026580c866
Body
Media type: application/json
Type: object
Properties- accessKey: required(string)
The password for the new user
- identity: required(string)
The identity email used for the user. This email will also used as the initial contact email for the user.
- country: (string)
- locale: (string)
- name: required(string)
- emailOptIn: (boolean)
Have the user opted in to receive marketing emails?
- tags: (array of string)
- signupInfo: (object)
info that will be saved during signup
- deviceModel: (string)
- deviceType: (string)
- devicePlatform: (string)
- url: (string)
- proxyDeviceType: (string)
- qrCode: (string)
- captcha: (object)
user CAPTCHA result
- reCaptchaToken: required(string)
- dynamic: (object)
Dynamic user data.
Example:
{
"name": "Foo",
"country": "SE",
"locale": "sv-SE",
"emailOptIn": false,
"identity": "identity@foo.test",
"accessKey": "password",
"captcha": {
"reCaptchaToken": "03AGdBq24ZPjIbLH4yhkJtjYtD7RcP4eD7nWzgYNDvwR4frjKVL627x7arzLarf9PU0t1Z1lmk0U14xOsVZLC-h5p_SGEPHoHAeifpa0exuaUYMICzfs3u86xGUikQD3Pu4emfqVnmD1SMMsZIwqkpn4PhBfLfjv4zYphWwarqcNnLUjIgnjX4f1I6y4evh8dSUhhfXYXLd-04gbglqYc_mwrzS3F1cEaxsPAkZaKMb3dAxwVGI5vcAMvksx9eALSRn65Rcfhi4i3d8UYC6Sc9nRVeX0a1OV_-ibPs0UCu5Nhqj6wdJIdF5BQI4s6EKZibkwotEUSuM_7_wpspkCelN11AAw_RIyWf6uMfl0vseMK_k5Xa7jRtZnmP5mR9YXpxVGhC4UQKTMVGVk53w9zQ0V2x1un3D8GnnJqyl01zET1__vbuTNwb95TiX7htMRNeoVNaIut62PTS"
}
}
HTTP status code 201
Body
Media type: application/json
Type: object
Properties- sessionId: required(string)
- openId: (string)
- registered: required(boolean)
Always set to true
- newUser: required(boolean)
Always set to true
- userId: required(string)
A string identifying a user
Example:
8TCMSYVQZNXJA4CUKC01VD36FUSR
- email: required(string)
The contact email for the user.
- name: required(string)
- token: required(string)
A JWT token
Example:
eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE0Nzc1ODA4MzksInN1YiI6IjJIU1ZXSDBXUDVZM1VWSDgzWDhVU1IiLCJ1c2VySWQiOiIySFNWV0gwV1A1WTNVVkg4M1g4VVNSIn0.k0-xiD006g7fWmEO6nIWVlKbZx035r_dlYVXQTtCFpw
Example:
{
"sessionId": "db075cc0-9d0c-11e6-b450-0100000000bc",
"openId": "identity@email.test",
"registered": true,
"newUser": true,
"userId": "DH05QLF69RUL6B2V0W4CUQOI8USR",
"email": "contact@email.test",
"name": "Foo",
"token": "eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE0Nzc1ODA4MzksInN1YiI6IjJIU1ZXSDBXUDVZM1VWSDgzWDhVU1IiLCJ1c2VySWQiOiIySFNWV0gwV1A1WTNVVkg4M1g4VVNSIn0.k0-xiD006g7fWmEO6nIWVlKbZx035r_dlYVXQTtCFpw"
}
HTTP status code 400
The provided signup information is invalid
HTTP status code 403
User verification has failed (for example, because of CAPTCHA)
HTTP status code 409
The provided information is conflicting with already existing users
post /auth/email
Authenticate
Headers
- Magine-AccessToken: required(string)
A token that identifies a specific partner
Example:
25b70ae1-d2bd-4ae7-85f4-62026580c866
Body
Media type: application/json
Type: object
Properties- accessKey: required(string)
The password for the user
- identity: required(string)
The login identity for the user
Example:
{
"identity": "identity@email.test",
"accessKey": "password"
}
HTTP status code 200
Body
Media type: application/json
Type: object
Properties- sessionId: required(string)
- openId: required(string)
- newUser: required(boolean)
Always set to false
- registered: required(boolean)
Always set to true
- userId: required(string)
A string identifying a user
Example:
8TCMSYVQZNXJA4CUKC01VD36FUSR
- email: required(string)
- name: required(string)
- token: required(string)
A JWT token
Example:
eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE0Nzc1ODA4MzksInN1YiI6IjJIU1ZXSDBXUDVZM1VWSDgzWDhVU1IiLCJ1c2VySWQiOiIySFNWV0gwV1A1WTNVVkg4M1g4VVNSIn0.k0-xiD006g7fWmEO6nIWVlKbZx035r_dlYVXQTtCFpw
Example:
{
"sessionId": "db075cc0-9d0c-11e6-b450-0100000000bc",
"openId": "identity@email.test",
"registered": true,
"newUser": false,
"userId": "DH05QLF69RUL6B2V0W4CUQOI8USR",
"email": "contact@email.test",
"name": "Foo",
"token": "eyJhbGciOiJIUzUxMiJ9.eyJpYXQiOjE0Nzc1ODA4MzksInN1YiI6IjJIU1ZXSDBXUDVZM1VWSDgzWDhVU1IiLCJ1c2VySWQiOiIySFNWV0gwV1A1WTNVVkg4M1g4VVNSIn0.k0-xiD006g7fWmEO6nIWVlKbZx035r_dlYVXQTtCFpw"
}
HTTP status code 401
The provided credentials are not valid
Reset password
Send email to users contact email with instructions on how to reset their password
post /password/send-reset-email
Headers
- Magine-AccessToken: required(string)
A token that identifies a specific partner
Example:
25b70ae1-d2bd-4ae7-85f4-62026580c866
Body
Media type: application/json
Type: object
Properties- email: required(string)
- locale: required(string)
Example:
{
"locale": "de",
"email": "example@email.com"
}
Send email to users contact email with instructions on how to set their password
post /password/send-set-password
Headers
- Magine-AccessToken: required(string)
A token that identifies a specific partner
Example:
25b70ae1-d2bd-4ae7-85f4-62026580c866
Body
Media type: application/json
Type: object
Properties- uid: required(string)
A string identifying a user
Example:
8TCMSYVQZNXJA4CUKC01VD36FUSR
- locale: required(string)
Example:
{
"locale": "de",
"uid": "DH05QLF69RUL6B2V0W4CUQOI8USR"
}
Reset the users password (using the one-time token previously sent to the users email)