Authentication APIs
Click an API to expand/collapse it.
- Description
- Creates a token for an administrator user.
- Request Endpoint
- POST https://<Example api server address>/login/admin
- Parameters
-
None.
- cURL syntax
-
curl --include \
--request POST \
--header "Content-Type: application/json" \
--data-binary "{
\"loginId\": \"abc\",
\"password\": \"abc@123\"
}" \
'https://core.dev.Example.net/api/login/admin'
- POST body
-
Headers: Content-Type: application/json
{
"loginId": "abc",
"password": "abc@123"
}
- Response body A
-
Headers: Content-Type: application/json | HTTPS Status Code: 200
{
"data": {
"adminUser": {
"id": "e20771d1-e58a-462b-bc9e-30f74be3926e",
"email": "ivishwas.s@gmail.com",
"firstName": "Vishwas",
"loginId": "vishwas",
"lastName": "Shashidhar",
"role": "SUPER_ADMIN",
"twoFactorEnabled": true,
"attemptsBeforeTwoFactor": 2,
"twoFactorLoginExpiryDate": 1469029431110
},
"token": null,
"twoFactorCheckRequired": true
},
"detail": null,
"error": false,
"message": "Admin user login successful"
}
- Response body B
-
Headers: Content-Type: application/json | HTTPS Status Code: 200
{
"data": {
"adminUser": {
"id": "e20771d1-e58a-462b-bc9e-30f74be3926e",
"email": "ivishwas.s@gmail.com",
"firstName": "Vishwas",
"loginId": "vishwas",
"lastName": "Shashidhar",
"role": "SUPER_ADMIN",
"twoFactorEnabled": false,
"attemptsBeforeTwoFactor": 1,
"twoFactorLoginExpiryDate": null
},
"token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJlMjA3NzFkMS1lNThhLTQ2MmItYmM5ZS0zMGY3NGJlMzkyNmUiLCJpYXQiOjE0NjkwMjk0MjEsInN1YiI6InN1cGVyLWFkbWluIiwiaXNzIjoiYmV0Y2FkZS1jb3JlIiwibGFuZyI6ImVuIiwicm9sZSI6IlNVUEVSX0FETUlOIiwiZXhwIjoxNDY5MDM2NjIxfQ.8qGJR61uQWXkx0FzsjCpjMFwa_W2Rv2672thMiGQFy0",
"twoFactorCheckRequired": false
},
"detail": null,
"error": false,
"message": "Admin user login successful"
}
Return to top
- Description
- Allows a two factor login.
- Request Endpoint
- POST https://<Example api server address>/login/admin/2fa
- Parameters
-
None.
- cURL syntax
-
curl --include \
--request POST \
--header "Content-Type: application/json" \
--data-binary "{
\"adminUserId\": \"e20771d1-e58a-462b-bc9e-30f74be3926e\",
\"token\": 173876
}" \
'https://core.dev.Example.net/api/login/admin/2fa'
- POST body
-
Headers: Content-Type: application/json
{
"adminUserId": "e20771d1-e58a-462b-bc9e-30f74be3926e",
"token": 173876
}
- Response body
-
Headers: Content-Type: application/json | HTTPS Status Code: 200
{
"data": {
"adminUser": {
"id": "e20771d1-e58a-462b-bc9e-30f74be3926e",
"email": "ivishwas.s@gmail.com",
"firstName": "Vishwas",
"loginId": "vishwas",
"lastName": "Shashidhar",
"role": "SUPER_ADMIN",
"twoFactorEnabled": true,
"attemptsBeforeTwoFactor": 2,
"twoFactorLoginExpiryDate": null
},
"token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJlMjA3NzFkMS1lNThhLTQ2MmItYmM5ZS0zMGY3NGJlMzkyNmUiLCJpYXQiOjE0NjkwMjk0MjEsInN1YiI6InN1cGVyLWFkbWluIiwiaXNzIjoiYmV0Y2FkZS1jb3JlIiwibGFuZyI6ImVuIiwicm9sZSI6IlNVUEVSX0FETUlOIiwiZXhwIjoxNDY5MDM2NjIxfQ.8qGJR61uQWXkx0FzsjCpjMFwa_W2Rv2672thMiGQFy0",
"twoFactorCheckRequired": false
},
"detail": null,
"error": false,
"message": "Admin user login successful"
}
Return to top
Request
- Description
- Creates a token for the sdk / casino app
- Request Endpoint
- POST https://<Example api server address>/login/sdk
- Parameters
-
None.
- cURL syntax
-
curl --include \
--request POST \
--header "Content-Type: application/json" \
--data-binary "{
\"developerKey\": \"1f5d5a52c6963200d70a937d7fb2458aacac11c8e99e88b667f6799951503583\"
}" \
'https://core.dev.Example.net/api/login/sdk'
- POST body
-
Headers: Content-Type: application/json
{
"developerKey": "1f5d5a52c6963200d70a937d7fb2458aacac11c8e99e88b667f6799951503583"
}
- Response body
-
Headers: Content-Type: application/json | HTTPS Status Code: 200
{
"data": {
"token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIyNjA2ODAyOS05YTNlLTQxZWYtYjFmZC01NDEwODUyZjU5ZDgiLCJpYXQiOjE0Njc2NDYzNDcsInN1YiI6InN0b3JlIiwiaXNzIjoiYmV0Y2FkZS1jb3JlIiwibGFuZyI6ImVuIiwicm9sZSI6IlNUT1JFIiwiZXhwIjoxNDY3NjUzNTQ3fQ.kQXVeaHSyqNU1j3C5rOa-7K7z7kxO00p3nqwMM33PfA",
"refreshToken": "a6849f39800c7321bc9750e68acabe7c77907c0dadb80590cbcb41a322b0e8e7"
},
"detail": null,
"error": false,
"message": "SDK login successful"
}
Return to top
- Description
- Allows a client to get a new access token using a refresh token and an existing valid access token.
- Request Endpoint
- POST https://<Example api server address>/login/token/new
- Parameters
-
None.
- cURL syntax
-
curl --include \
--request POST \
--header "Content-Type: application/json" \
--data-binary "{
\"existingAccessToken\": \"eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI5ZDI4NmM5Zi1iY2FhLTQ0OTMtODZmMy00MWY3NWZmY2E5YTQiLCJpYXQiOjE0Njc5MjA2MDAsInN1YiI6InN0b3JlIiwiaXNzIjoiYmV0Y2FkZS1jb3JlIiwibGFuZyI6ImVuIiwicm9sZSI6IlNUT1JFIiwiZXhwIjoxNDY3OTI3ODAwfQ.pDHqVonHIA8JnH-6foGofjBGrKPRpPYtEO60W9_eNYw\",
\"refreshToken\": \"45193ec78e9be9d58592a4438924bc59627a706bb9f4beebdc107083e6438d20\"
}" \
'https://core.dev.Example.net/api/login/token/new'
- POST body
-
Headers: Content-Type: application/json
{
"existingAccessToken": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI5ZDI4NmM5Zi1iY2FhLTQ0OTMtODZmMy00MWY3NWZmY2E5YTQiLCJpYXQiOjE0Njc5MjA2MDAsInN1YiI6InN0b3JlIiwiaXNzIjoiYmV0Y2FkZS1jb3JlIiwibGFuZyI6ImVuIiwicm9sZSI6IlNUT1JFIiwiZXhwIjoxNDY3OTI3ODAwfQ.pDHqVonHIA8JnH-6foGofjBGrKPRpPYtEO60W9_eNYw",
"refreshToken": "45193ec78e9be9d58592a4438924bc59627a706bb9f4beebdc107083e6438d20"
}
- Response body
-
Headers: Content-Type: application/json | HTTPS Status Code: 200
{
"data": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI5ZDI4NmM5Zi1iY2FhLTQ0OTMtODZmMy00MWY3NWZmY2E5YTQiLCJpYXQiOjE0Njc5MjE3ODAsInN1YiI6InN0b3JlIiwiaXNzIjoiYmV0Y2FkZS1jb3JlIiwibGFuZyI6ImVuIiwicm9sZSI6IlNUT1JFIiwiZXhwIjoxNDY3OTI4OTgwfQ.CgjxgTxR9SV_uuP_bYpMp2mr7n8uJgeyCakQZjtgpt0",
"detail": null,
"error": false,
"message": "Creating new access token successful"
}
Return to top
Request
- Description
- Creates a token for an operator user.
- Request Endpoint
- POST https://<Example api server address>/login/operator
- Parameters
-
None.
- cURL syntax
-
curl --include \
--request POST \
--header "Content-Type: application/json" \
--data-binary "{
\"email\": \"operator@casino.com\",
\"password\": \"pass1\"
}" \
'https://core.dev.Example.net/api/login/operator'
- POST body
-
Headers: Content-Type: application/json
{
"email": "operator@casino.com",
"password": "pass1"
}
- Response body
-
Headers: Content-Type: application/json | HTTPS Status Code: 200
{
"data": {
"token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIyNjA2ODAyOS05YTNlLTQxZWYtYjFmZC01NDEwODUyZjU5ZDgiLCJpYXQiOjE0Njc2NDYzNDcsInN1YiI6InN0b3JlIiwiaXNzIjoiYmV0Y2FkZS1jb3JlIiwibGFuZyI6ImVuIiwicm9sZSI6IlNUT1JFIiwiZXhwIjoxNDY3NjUzNTQ3fQ.kQXVeaHSyqNU1j3C5rOa-7K7z7kxO00p3nqwMM33PfA"
},
"detail": null,
"error": false,
"message": "Operator login successful"
}
Return to top
Request
- Description
- Creates a token for a publisher user.
- Request Endpoint
- POST https://<Example api server address>/login/publisher
- Parameters
-
None.
- cURL syntax
-
curl --include \
--request POST \
--header "Content-Type: application/json" \
--data-binary "{
\"email\": \"publisher@casino.com\",
\"password\": \"pass1\"
}" \
'https://core.dev.Example.net/api/login/publisher'
- POST body
-
Headers: Content-Type: application/json
{
"email": "publisher@casino.com",
"password": "pass1"
}
- Response body
-
Headers: Content-Type: application/json | HTTPS Status Code: 200
{
"data": {
"token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIyNjA2ODAyOS05YTNlLTQxZWYtYjFmZC01NDEwODUyZjU5ZDgiLCJpYXQiOjE0Njc2NDYzNDcsInN1YiI6InN0b3JlIiwiaXNzIjoiYmV0Y2FkZS1jb3JlIiwibGFuZyI6ImVuIiwicm9sZSI6IlNUT1JFIiwiZXhwIjoxNDY3NjUzNTQ3fQ.kQXVeaHSyqNU1j3C5rOa-7K7z7kxO00p3nqwMM33PfA"
},
"detail": null,
"error": false,
"message": "Publisher login successful"
}
Return to top
Request
- Description
- Creates a token for the sdk / casino user.
- Request Endpoint
- POST https://<Example api server address>/login/sdk/user
- Parameters
-
None.
- cURL syntax
-
curl --include \
--request POST \
--header "Content-Type: application/json" \
--data-binary "{
\"developerKey\": \"1084d1aa4a5be05b562368aa6577896d378ecea3d0651815d68bf97ebb07664e\",
\"userId\": \"c3da6ce7-0576-4772-93c1-dac0b3816fbf\"
}" \
'https://core.dev.Example.net/api/login/sdk/user'
- POST body
-
Headers: Content-Type: application/json
{
"developerKey": "1084d1aa4a5be05b562368aa6577896d378ecea3d0651815d68bf97ebb07664e",
"deviceUdid": "20837189380123210382438129",
"socialId": "3084721083890128309130921u3",
"loginType": "GOOGLE",
"pin": "8702"
}
- Response body
-
Headers: Content-Type: application/json | HTTPS Status Code: 200
{
"data": {
"token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIyNjA2ODAyOS05YTNlLTQxZWYtYjFmZC01NDEwODUyZjU5ZDgiLCJpYXQiOjE0Njc2NDYzNDcsInN1YiI6InN0b3JlIiwiaXNzIjoiYmV0Y2FkZS1jb3JlIiwibGFuZyI6ImVuIiwicm9sZSI6IlNUT1JFIiwiZXhwIjoxNDY3NjUzNTQ3fQ.kQXVeaHSyqNU1j3C5rOa-7K7z7kxO00p3nqwMM33PfA",
"user": {
"id": "c3da6ce7-0576-4772-93c1-dac0b3816fbf",
"firstName": "John",
"lastName": "Nair",
"fullName": "John Nair",
"profileName": "John",
"profileImagePath": null,
"registrationDate": 1448898079793,
"birthDateDay": 12,
"birthDateMonth": 1,
"birthDateYear": 1945,
"locationCountry": "India",
"locationZipCode": "1234234",
"timezone": null,
"userSetting": null,
"socialAuthenticationChannels": [
{
"loginType": "FACEBOOK",
"socialId": "123456789",
"addedOn": 1448898079793,
"lastUsedOn": 1448898079793
}
],
"emailAuthenticationChannels": [],
"mobileAuthenticationChannels": [],
"addresses": null,
"status": "EXISTING",
"verified": true,
"pinResetDate": null
},
"refreshToken": "a6849f39800c7321bc9750e68acabe7c77907c0dadb80590cbcb41a322b0e8e7"
},
"detail": null,
"error": false,
"message": "Store login successful"
}
Return to top
Request
- Description
- Allows an admin user to setup 2FA.
- Request Endpoint
- POST https://<Example api server address>/login/admin/2fa/create
- Parameters
-
None.
- cURL syntax
-
curl --include \
--request POST \
--header "Content-Type: application/json" \
--data-binary "{
\"adminUserId\": \"e20771d1-e58a-462b-bc9e-30f74be3926e\"
}" \
'https://core.dev.Example.net/api/login/admin/2fa/create'
- POST body
-
Headers: Content-Type: application/json
{
"adminUserId": "e20771d1-e58a-462b-bc9e-30f74be3926e"
}
- Response body
-
Headers: Content-Type: application/json | HTTPS Status Code: 200
{
"data": {
"key": "BWPXG5HEYMAZGURM",
"qrCode": "https://chart.googleapis.com/chart?
chs=200x200&
chld=M%7C0&
cht=qr&
chl=otpauth%3A%2F%2Ftotp%2FBetcade%3Aivishwas.s%40gmail.com%3Fsecret%3DBWPXG5HEYMAZGURM%26issuer%3DBetcade"
},
"detail": null,
"error": false,
"message": "Setting up two factor successful"
}
Return to top
Request
- Description
- Creates a token for the store APK.
- Request Endpoint
- POST https://<Example api server address>/login/store
- Parameters
-
None.
- cURL syntax
-
curl --include \
--request POST \
--header "Content-Type: application/json" \
--data-binary "{
\"developerKey\": \"1f5d5a52c6963200d70a937d7fb2458aacac11c8e99e88b667f6799951503583\"
}" \
'https://core.dev.Example.net/api/login/store'
- POST body attributes (JSON)
-
Attribute |
Type |
Use |
Description |
developerKey |
String |
Required |
The developer key used to enable the login. |
- POST body
-
Headers: Content-Type: application/json
{
"developerKey": "1f5d5a52c6963200d70a937d7fb2458aacac11c8e99e88b667f6799951503583"
}
- Response body
-
Headers: Content-Type: application/json | HTTPS Status Code: 200
{
"data": {
"token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIyNjA2ODAyOS05YTNlLTQxZWYtYjFmZC01NDEwODUyZjU5ZDgiLCJpYXQiOjE0Njc2NDYzNDcsInN1YiI6InN0b3JlIiwiaXNzIjoiYmV0Y2FkZS1jb3JlIiwibGFuZyI6ImVuIiwicm9sZSI6IlNUT1JFIiwiZXhwIjoxNDY3NjUzNTQ3fQ.kQXVeaHSyqNU1j3C5rOa-7K7z7kxO00p3nqwMM33PfA"
},
"detail": null,
"error": false,
"message": "Store login successful"
}
Return to top
Request
- Description
- Creates a token for the store APK.
- Request Endpoint
- POST https://<Example api server address>/login/store/user
- Parameters
-
None.
- cURL syntax
-
curl --include \
--request POST \
--header "Content-Type: application/json" \
--data-binary "{
\"developerKey\": \"1084d1aa4a5be05b562368aa6577896d378ecea3d0651815d68bf97ebb07664e\",
\"deviceUdid\": \"20837189380123210382438129\",
\"socialId\": \"3084721083890128309130921u3\",
\"loginType\": \"GOOGLE\",
\"pin\": \"8702\"
}" \
'https://core.dev.Example.net/api/login/store/user'
- POST body
-
Headers: Content-Type: application/json
{
"developerKey": "1084d1aa4a5be05b562368aa6577896d378ecea3d0651815d68bf97ebb07664e",
"deviceUdid": "20837189380123210382438129",
"socialId": "3084721083890128309130921u3",
"loginType": "GOOGLE",
"pin": "8702"
}
- Response body
-
Headers: Content-Type: application/json | HTTPS Status Code: 200
{
"data": {
"token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIyNjA2ODAyOS05YTNlLTQxZWYtYjFmZC01NDEwODUyZjU5ZDgiLCJpYXQiOjE0Njc2NDYzNDcsInN1YiI6InN0b3JlIiwiaXNzIjoiYmV0Y2FkZS1jb3JlIiwibGFuZyI6ImVuIiwicm9sZSI6IlNUT1JFIiwiZXhwIjoxNDY3NjUzNTQ3fQ.kQXVeaHSyqNU1j3C5rOa-7K7z7kxO00p3nqwMM33PfA",
"user": {
"id": "c3da6ce7-0576-4772-93c1-dac0b3816fbf",
"firstName": "John",
"lastName": "Nair",
"fullName": "John Nair",
"profileName": "John",
"profileImagePath": null,
"registrationDate": 1448898079793,
"birthDateDay": 12,
"birthDateMonth": 1,
"birthDateYear": 1945,
"locationCountry": "India",
"locationZipCode": "1234234",
"timezone": null,
"userSetting": null,
"socialAuthenticationChannels": [
{
"loginType": "FACEBOOK",
"socialId": "123456789",
"addedOn": 1448898079793,
"lastUsedOn": 1448898079793
}
],
"emailAuthenticationChannels": [],
"mobileAuthenticationChannels": [],
"addresses": null,
"status": "EXISTING",
"verified": true,
"pinResetDate": null
}
},
"detail": null,
"error": false,
"message": "Store User login successful"
}
Return to top
Request
- Description
- Creates a token for the third party developer.
- Request Endpoint
- POST https://<Example api server address>/login/developer
- Parameters
-
None.
- cURL syntax
-
curl --include \
--request POST \
--header "Content-Type: application/json" \
--data-binary "{
\"developerKey\": \"1f5d5a52c6963200d70a937d7fb2458aacac11c8e99e88b667f6799951503583\"
}" \
'https://core.dev.Example.net/api/login/developer'
- POST body
-
Headers: Content-Type: application/json
{
"developerKey": "1f5d5a52c6963200d70a937d7fb2458aacac11c8e99e88b667f6799951503583"
}
- Response body
-
Headers: Content-Type: application/json | HTTPS Status Code: 200
{
"data": {
"token": "eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiIyNjA2ODAyOS05YTNlLTQxZWYtYjFmZC01NDEwODUyZjU5ZDgiLCJpYXQiOjE0Njc2NDYzNDcsInN1YiI6InN0b3JlIiwiaXNzIjoiYmV0Y2FkZS1jb3JlIiwibGFuZyI6ImVuIiwicm9sZSI6IlNUT1JFIiwiZXhwIjoxNDY3NjUzNTQ3fQ.kQXVeaHSyqNU1j3C5rOa-7K7z7kxO00p3nqwMM33PfA"
},
"detail": null,
"error": false,
"message": "SDK login successful"
}
Return to top
Request
- Description
- Allows an admin user to verify the setup of 2FA.
- Request Endpoint
- POST https://<Example api server address>/login/admin/2fa/verify
- Parameters
-
None.
- cURL syntax
-
curl --include \
--request POST \
--header "Content-Type: application/json" \
--data-binary "{
\"adminUserId\": \"e20771d1-e58a-462b-bc9e-30f74be3926e\",
\"token\": 173876
}" \
'https://core.dev.Example.net/api/login/admin/2fa/verify'
- POST body
-
Headers: Content-Type: application/json
{
"adminUserId": "e20771d1-e58a-462b-bc9e-30f74be3926e",
"token": 173876
}
- Response body
-
Headers: Content-Type: application/json | HTTPS Status Code: 200
{
"data": {
"id": "e20771d1-e58a-462b-bc9e-30f74be3926e",
"email": "ivishwas.s@gmail.com",
"firstName": "Vishwas",
"loginId": "vishwas",
"lastName": "Shashidhar",
"role": "SUPER_ADMIN",
"twoFactorEnabled": true,
"attemptsBeforeTwoFactor": 2,
"twoFactorLoginExpiryDate": null
},
"detail": null,
"error": false,
"message": "Verifying two factor token successful"
}
Return to top