Authentication
This endpoint is used to authenticate users and perform various actions such as device login, email login, and registration.
URL: https://api.idosgames.com/api/[titleTemplateId]/[titleId]/Client/Authentication/
LoginWithDeviceID
Purpose: Allows a user to log in using their device ID. URL:
https://api.idosgames.com/api/[titleTemplateId]/[titleId]/Client/Authentication/LoginWithDeviceID
Method: POST
Request Parameters (JSON body)
deviceID
(string): The unique identifier of the user's device.platform
(string): The platform the device is running on (e.g., Android, iOS).device
(string): Information about the device (e.g., model or type).ip
(string, optional): The user's IP address.userName
(string, optional): The user's username.
Responses
200 OK: Successful login. Returns a
GetAllUserDataResult
object with user data.400 Bad Request: Incorrect request parameters. Returns an error message, e.g., "INVALID_INPUT_DATA".
Example Usage
Request:
fetch('https://api.idosgames.com/api/[titleTemplateId]/[titleId]/Client/Authentication/LoginWithDeviceID', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
DeviceID: 'unique-device-id',
Platform: 'Android',
Device: 'Samsung Galaxy S21',
UserName: 'exampleUser'
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Response:
{
"UserID": "generated-user-id",
"CustomUserData": {
"DataVersion": 1,
"Data": {}
},
...
}
LoginWithEmail
Purpose: Allows a user to log in using their email and password. URL:
https://api.idosgames.com/api/[titleTemplateId]/[titleId]/Client/Authentication/LoginWithEmail
Method: POST
Request Parameters (JSON body)
email
(string): The user's email address.password
(string): The user's password.
Responses
200 OK: Successful login. Returns a
GetAllUserDataResult
object with user data.400 Bad Request: Incorrect request parameters or invalid credentials. Possible messages: "INVALID_INPUT_DATA", "USER_NOT_FOUND", "INCORRECT_PASSWORD".
Example Usage
Request:
fetch('https://api.idosgames.com/api/[titleTemplateId]/[titleId]/Client/Authentication/LoginWithEmail', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: '[email protected]',
password: 'securepassword'
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Response:
{
"UserID": "existing-user-id",
"CustomUserData": {
"DataVersion": 1,
"Data": {}
},
...
}
AddEmailAndPassword
Purpose: Adds an email and password to an existing user's account. URL:
https://api.idosgames.com/api/[titleTemplateId]/[titleId]/Client/Authentication/AddEmailAndPassword
Method: POST
Request Parameters (JSON body)
userID
(string): The user's unique identifier.email
(string): The email address to be added.password
(string): The password to be added.clientSessionTicket
(string): The session ticket for authenticating the current session.
Responses
200 OK: Operation successful. Returns a success message.
400 Bad Request: Incorrect request parameters or validation error. Possible messages: "INVALID_INPUT_DATA", "USER_NOT_FOUND", "SESSION_EXPIRED", "INVALID_SESSION_TICKET", "EMAIL_ALREADY_EXISTS", "FAILED_TO_SAVE_TO_DATABASE".
Example Usage
Request:
fetch('https://api.idosgames.com/api/[titleTemplateId]/[titleId]/Client/Authentication/AddEmailAndPassword', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
userID: 'existing-user-id',
email: '[email protected]',
password: 'newpassword',
clientSessionTicket: 'valid-session-ticket'
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Response:
{
"Message": "SUCCESS"
}
RegisterUserByEmail
Purpose: Registers a new user using their email and password.
URL:
https://api.idosgames.com/api/[titleTemplateId]/[titleId]/Client/Authentication/RegisterUserByEmail
Method: POST
Request Parameters (JSON body)
email
(string): The email address for registration.password
(string): The password for the new account.platform
(string): The user's platform.device
(string): The user's device information.deviceID
(string): The user's device ID.ip
(string, optional): The user's IP address.userName
(string, optional): The user's username.
Responses
200 OK: Successful registration. Returns a
GetAllUserDataResult
object with new user data.400 Bad Request: Incorrect request parameters or email already in use. Possible messages: "INVALID_INPUT_DATA", "EMAIL_ALREADY_EXISTS", "REGISTRATION_FAILED".
Example Usage
Request:
fetch('https://api.idosgames.com/api/[titleTemplateId]/[titleId]/Client/Authentication/RegisterUserByEmail', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
email: '[email protected]',
password: 'securepassword',
platform: 'iOS',
device: 'iPhone 13',
deviceID: 'unique-device-id'
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
Response:
{
"UserID": "new-generated-user-id",
"CustomUserData": {
"DataVersion": 1,
"Data": {}
},
...
}
Last updated
Was this helpful?