Returns the OAuth token set in browser's localStorage object
Contains the data:
{
token: string,
refreshToken: string,
expires: number
}
Returns a boolean if the user is authenticated
Removes the token from browser's localStorage object
Sets the Token in browser's localStorage object
The authorisation token of the logged in account.
The refresh token of the logged in account.
The token's expiration date of the logged in account.
Changes password for a given user
Deletes an account
Contains the data:
{
code: 200,
message: "Account successfully deleted"
}
Exports account data to the users' email
Contains the data:
{
code: 200,
message: "Account successfully exported"
}
Gets the account information for a given auth token
Contains the data:
{
id: number;
email: string;
full_name: string;
referrer: string;
metadata: Record<string, unknown>;
social_apps_metadata: Record<string, unknown>[];
roles: string[];
completed: boolean;
created_at: number;
updated_at: number;
date_of_birth: number;
uuid: string;
merchant_uuid: string;
}
Gets register fields
The Merchant's unique universal identifier (Merchant UUID). You can find it on the InPlayer's dashboard at the Account Details section as Account ID.
Contains the data:
{
id: number;
name: string;
label: string;
type: string;
required: boolean;
default_value: string;
placeholder: string;
options: [{
[key: string]: string;
}];
}
Gets the social login urls for fb/twitter/google
The social login state. The state needs to be json and base64 encoded to be sent as a query parameter. Example: btoa(JSON.stringify({uuid: 'foo', redirect: 'http://example.com'}))
Contains the data:
{
ocial_urls: [
facebook: string;
twitter: string;
google: string;
];
code: number;
}
Returns restriction settings per Merchant
The Merchant's unique universal identifier (Merchant UUID). You can find it on the InPlayer's dashboard at the Account Details section as Account ID.
Contains the data:
{
"age_verification_type": "pin_code",
"age_verification_enabled": true,
"merchant_uuid": "3b39b5ab-b5fc-4ba3-b770-73155d20e61f",
"created_at": 1532425425,
"updated_at": 1532425425
}
Refreshes the token
The Merchant's unique universal identifier (Merchant UUID). You can find it on the InPlayer's dashboard at the Account Details section as Account ID.
Contains the data:
{
access_token: string;
refresh_token: string;
expires: number;
account: {
id: number,
email: string,
full_name: string,
referrer: string,
metadata: Record<string, unknown>,
social_apps_metadata: Object[],
roles: string[],
completed: boolean,
date_of_birth: number,
created_at: number,
updated_at: number,
uuid: string;
merchant_uuid: string;
}
}
Reports the generated SSO token to the SSO domain.
The SSO domain.
The authorisation token of the logged in account.
Should the token be deactivated or activated. If it is not set the token won't be deactivated.
Requests new password for a given user
Promise<AxiosResponse
{
code: 200,
message: ''
}
Creates pin code and sends it to the users' email
The id of created branding theme in InPlayer Dashboard. If it is not set the default branding details will be returned.
Contains the data:
{
code: 200,
message: "Pin code successfully sent"
}
Sets new password for the user
The reset token from received email message after successfull new password request.
Signs in the user
Contains the data:
{
access_token: string,
refresh_token: string,
expires: number;
account: {
id: number,
email: string,
full_name: string,
referrer: string,
metadata: Record<string, unknown>,
social_apps_metadata: Object[],
roles: string[],
completed: boolean,
date_of_birth: number,
created_at: number,
updated_at: number,
uuid: string;
merchant_uuid: string;
}
}
Signs in the user v2
Contains the data:
{
access_token: string,
refresh_token: string,
expires: number;
account: {
id: number,
email: string,
full_name: string,
referrer: string,
metadata: Record<string, unknown>,
social_apps_metadata: Object[],
roles: string[],
completed: boolean,
date_of_birth: number,
created_at: number,
updated_at: number,
uuid: string;
merchant_uuid: string;
}
}
Signs out the user and destroys cookies
Signs up/Registers user
Contains the data:
{
access_token: string;
refresh_token: string;
expires: number;
account: {
id: number,
email: string,
full_name: string,
referrer: string,
metadata: Record<string, unknown>,
social_apps_metadata: Object[],
roles: string[],
completed: boolean,
date_of_birth: number,
created_at: number,
updated_at: number,
uuid: string;
merchant_uuid: string;
}
}
Signs up/Registers user v2
Contains the data:
{
access_token: string;
refresh_token: string;
expires: number;
account: {
id: number,
email: string,
full_name: string,
referrer: string,
metadata: Record<string, unknown>,
social_apps_metadata: Object[],
roles: string[],
completed: boolean,
date_of_birth: number,
created_at: number,
updated_at: number,
uuid: string;
merchant_uuid: string;
}
}
Creates or returns an existing external account integrated with an InPlayer fan account
The name of the external integration
The id of created premium content in InPlayer Dashboard (i.e asset id or package id).
Contains the data:
{
id: 3, // The record id
account_id: 54321, // The InPlayer account id
token: '45b1b30-aa2f1h-9abc-j5dsg-78d36d' // The external integration longlived token
}
Updates the account info. Metadata fields must be from the Inplayer.getRegisterFields()
Updates an existing external account integrated with an InPlayer fan account
The name of the external integration The additional required and/or optional fields that merchants can choose to require from their end-users to fill in upon registration.
The external account fields with updated by user values (For example: new nickname value)
Checks validity of pin code
The pin code from received email message.
Contains the data:
{
code: 200,
message: "Pin code is valid"
}
Generated using TypeDoc
Contains all Requests regarding user account and authentication.