InPlayer Accounts API (2.0.0)

Download OpenAPI specification:Download

INTRODUCTION

InPlayer equips you to run a detailed subscription business model, to build and grow your consumer base, and drive significant revenues. Our paywall supports recurring payments and billing cycles, consumer acquisition, subscriber lifecycle management, and provides you with consumer retention CRM tools.

Once you create an InPlayer Merchant Account, you are entitled to using our InPlayer dashboard for publishing, managing, and selling your premium content. Moreover, you can always integrate with our APIs for a full custom integration.

INPLAYER API

The InPlayer API follows the REST architectural style and uses standard HTTP response codes to indicate success requests (2xx) or API errors (4xx, 5xx). Each of the InPlayer Core Resources (Accounts & Authentication, Asset & Access, Payments & Subscriptions, Vouchers & Promotions, Branding, Restrictions & Rules, Reporting, Analytics, and Features) has their own URL and each of the operations involved (POST, PUT, PATCH, GET, and DELETE) carries a specific meaning like creating, updating, fetching, deleting data, and much more.

All API requests should contain Content-Type:application/x-www-form-urlencoded header. The responses are always returned in JSON object(s), both for the successful requests and the failed attempts (errors).

DOCS TERMINOLOGY

The following section defines the domain language used across our platform. Proceed reading to introduce yourself to the terms employed for each of our Core Resources before you start working on your custom integration.

Accounts and Account Types

Term Explanation
merchant The Merchants are those who have ownership of the premium content.
consumer The Consumers are those who can view or buy the premium content.
customer The Customers are those who have made at least one purchase.
uuid Stands for the Unique Identifier of the Merchant. You can find it on the InPlayer's dashboard at the Account Details section as Account ID.

API ENVIRONMENTS

To make the API as explorable as possible, we have two different environments for production related and testing purposes. There is no switch for changing between modes, so just refer to the URL you need.

ERRORS

InPlayer uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided (e.g. a required parameter was omitted, a charge failed, etc.), and codes in the 5xx range indicate an error with InPlayer's servers.

Not all errors map cleanly onto HTTP response codes, however. For instance, when a request is valid but does not complete successfully (e.g. if asset access is not found), we return a 402 error code.

List of status codes

Status code Explanation
200 OK Everything worked as expected.
201 Created The resource has been created.
202 Accepted The request has been accepted for processing, but the processing has not been completed.
204 No Content The server has fulfilled the request but does not need to return an entity-body.
400 Bad Request The request was unacceptable, often due to omission of a required parameter.
401 Unauthorized No valid access token has been provided.
402 Request Failed The parameters were valid but the request failed.
404 Not Found The requested resource does not exist.
409 Conflict The request conflicts with another request.
429 Too Many Requests Too many requests have been sent to the API in a short amount of time. We recommend using exponential backoff for your requests.
500, 502, 503, 504 Server Errors Something went wrong on InPlayer's end.

V1

All operations related to accounts

Returns account information

Returns all the relevant information about a given account.

Authorizations:
bearerAuth

Responses

Request samples

curl https://services.inplayer.com/accounts \
  -H "Authorization: Bearer <token>"

Response samples

Content type
application/json
{
  • "id": 21,
  • "uuid": "528b1b80-5868-4abc-a9b6-4d3455d719c8",
  • "merchant_uuid": "528b1b80-5868-4abc-a9b6-4d3455d719c8",
  • "email": "example-email@inplayer.com",
  • "full_name": "John Doe",
  • "referrer": "https://inplayer.com",
  • "metadata": { },
  • "social_apps_metadata": [
    ],
  • "roles": [
    ],
  • "completed": true,
  • "date_of_birth": 1531482438,
  • "created_at": 1531482438,
  • "updated_at": 1531482438,
  • "expired_at": 1531482438
}

Create an account

Registers a new InPlayer account.

Request Body schema: application/x-www-form-urlencoded
full_name
required
string

The first and last name of the merchant

username
required
string

The email address of the merchant

password
required
string <password>

Password containing minimum 8 characters

password_confirmation
required
string <password>

The same password with minimum 8 characters

type
required
string
Enum: "consumer" "merchant"

Account types: "consumer", "merchant"

grant_type
string
Enum: "password" "client_credentials" "refresh_token"

The type of grant required to gain access token

client_id
required
string <string>

The merchant's OAuth application ID

referrer
string

The request’s source URL

date_of_birth
string <date-time>

Customer's birthdate Unix timestamp; conditionally required in case the merchant has enabled the 'age verification' feature.

Array of objects

Responses

Request samples

curl https://services.inplayer.com/accounts \
-d full_name="John Doe" \
-d username=john@example.com \
-d password=foobar123 \
-d password_confirmation=foobar123 \
-d type=consumer \
-d grant_type=password \
-d client_id=507d866c-4e33-445d-b027-f163d0099f54 \
-d metadata[phone]=bar

Response samples

Content type
application/json
{
  • "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  • "refresh_token": "def502006e2148f8751c7e7cfa58a91d7ecccdd6ac1648abe2fcf506e72729d4ca48a956ffe5a4afadd96e1e91c0d055262c66a3ce840e96e3542a33adbc657ed5b5810f87b130149308a9d73f5",
  • "account": {
    }
}

Deactivates an Account

Deactivates a customer account.

Authorizations:
bearerAuth
query Parameters
customerID
integer

Account's id

Responses

Request samples

curl -X DELETE https://services.inplayer.com/accounts \
  -H "Authorization: Bearer <token>"

Response samples

Content type
application/json
{
  • "code": 0,
  • "message": "string",
  • "errors": {
    }
}

Updates account

Updates an account.

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
id
integer

The account ID of a customer, necessary for the merchant to pass it in when updating a customer’s account. ID parameter is required when updating admin account.

full_name
required
string

The full name of the account

referrer
string

The request’s source URL

date_of_birth
string <date-time>

Customer's birthdate Unix timestamp conditionally required in case if the merchant has enabled the 'age verification' feature.

Array of objects

Responses

Request samples

curl -X PUT https://services.inplayer.com/accounts \
-H "Authorization: Bearer <token>" \
-d full_name="Jane Doe" \
-d metadata[foo]=bar

Response samples

Content type
application/json
{
  • "code": 404,
  • "message": "Account not found"
}

Request account activation

Starts the account activation process by sending an email containing the activation token and link for the account activation.

Request Body schema: application/x-www-form-urlencoded
email
required
string

The account’s email address

merchant_uuid
required
string <uuid>

The universal unique identifier from the account

Responses

Request samples

curl https://services.inplayer.com/accounts/activate \
-d email=john@example.com \
-d merchant_uuid=528b1b80-5868-4abc-a9b6-4d3455d719c8

Response samples

Content type
application/json
{
  • "message": "Please check your email for your account activation code.",
  • "code": 201
}

Activates an account

path Parameters
token
required
string

The activation token

Responses

Request samples

curl -X PUT https://services.inplayer.com/accounts/activate/{token}

Response samples

Content type
application/json
{
  • "code": 422,
  • "message": "The account could not be activated"
}

Get all followers

Returns all the followers created by the logged in (master) account.

Authorizations:
bearerAuth

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Post oAuth app

Creates new oAuth app

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
name
string

oAuth app name

Responses

Request samples

curl -X POST https://services.inplayer.com/accounts/apps \
  -H "Authorization: Bearer <token>" \
  -d name="Foo"

Response samples

Content type
application/json
{
  • "account_id": 12345,
  • "name": "Foo",
  • "redirectUri": "http://foo.com",
  • "active": 1,
  • "grantTypes": "password",
  • "default": 1,
  • "sso": 0
}

Get oAuth app

Get new oAuth app

Authorizations:
bearerAuth

Responses

Request samples

curl -X GET https://services.inplayer.com/accounts/apps \
-H "Authorization: Bearer <token>"

Response samples

Content type
application/json
{
  • "id": 21,
  • "uuid": "528b1b80-5868-4abc-a9b6-4d3455d719c8",
  • "merchant_uuid": "528b1b80-5868-4abc-a9b6-4d3455d719c8",
  • "email": "example-email@inplayer.com",
  • "full_name": "John Doe",
  • "referrer": "https://inplayer.com",
  • "metadata": { },
  • "social_apps_metadata": [
    ],
  • "roles": [
    ],
  • "completed": true,
  • "date_of_birth": 1531482438,
  • "created_at": 1531482438,
  • "updated_at": 1531482438,
  • "expired_at": 1531482438
}

Delete oAuth app

Deletes oAuth app

Authorizations:
bearerAuth
path Parameters
id
required
integer

oAuth app id

Responses

Request samples

curl -X DELETE https://services.inplayer.com/accounts/apps/{id} \
  -H "Authorization: Bearer <token>"

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "App was successfully deleted."
}

Update oAuth app

Updates oAuth app

Authorizations:
bearerAuth
path Parameters
id
required
integer

oAuth app id

Request Body schema: application/x-www-form-urlencoded
active
bool

Set app status

sso
bool

Sso must be of bool type and must not be empty

grant_types
Array of strings
name
string

Account's name, max 50 characters long

redirect_uris
Array of strings

Responses

Request samples

curl -X PUT https://services.inplayer.com/accounts/apps/{id}\
  -H "Authorization: Bearer <token>" \
  -d active = "true" \
  -d sso = "true" \
  -d grant_types[0]="password" \
  -d name = "Foo" \
  -d redirect_uris[0] = "http://foobar.com"


Response samples

Content type
application/json
{
  • "id": 12345,
  • "account_id": 12345,
  • "name": "Foo",
  • "redirectUri": "http://foo.com",
  • "active": 1,
  • "grantTypes": "password",
  • "default": 1,
  • "sso": 0
}

Update oAuth app secret

Updates oAuth app's secret

Authorizations:
bearerAuth
path Parameters
id
required
integer

oAuth app id

Responses

Request samples

curl -X PUT https://services.inplayer.com/accounts/apps/{id}/secret \
  -H "Authorization: Bearer <token>"

Response samples

Content type
application/json
{
  • "secret": "24426fe8d9ad21c70eccd7d9a92c860850975192dd7e40bf3239130a4348a0a0"
}

Authenticate Account

Authenticates an account by creating an access token that can be used for future requests.

Request Body schema: application/x-www-form-urlencoded
One of
username
required
string

The email address of the account, in case the grant type is password.

password
required
string <password>

The account password, in case the grant type is password

grant_type
required
string
Enum: "password" "client_credentials" "refresh_token"

With the grant type you can switch between authentication types.

client_id
required
string

The Merchant's OAuth application ID

referrer
string

The request’s source URL

Responses

Request samples

curl -X POST https://services.inplayer.com/accounts/authenticate \
  -d client_id="528b1b80-5868-4abc-a9b6-4d3455d719c8" \
  -d grant_type=client_credentials \
  -d client_secret=foobar \
  -d referrer='https://inplayer.com'

Response samples

Content type
application/json
{
  • "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  • "refresh_token": "swKbldciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adWAdzCa",
  • "account": {
    }
}

Change password

Replaces the account's password with a new one.

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
password
required
string <password>

The account's new password.

password_confirmation
required
string <password>

The account's new password, required for confirmation.

old_password
required
string <password>

The account's old password.

Responses

Request samples

curl https://services.inplayer.com/accounts/change-password \
      -H 'Authorization:Bearer <Access-Token>' \
      -d old_password=foo \
      -d password=secret \
      -d password_confirmation=secret

Response samples

Content type
application/json
{
  • "code": 401,
  • "message": "Invalid auth token"
}

Erase an account

Erases an account (and all the all personal details contained) permanently.

Authorizations:
bearerAuth
query Parameters
customer_id
required
integer

The ID of the customer account (if the operation has been invoked by a merchant)

password
required
string

Password confirmation

Responses

Request samples

curl -X DELETE https://services.inplayer.com/accounts/erase \
  -H 'Authorization:Bearer <Access-Token>' \
  -d password=foobar

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "The account does not exist"
}

Export Account Data

Exports account data such as logins, payments, subscriptions, access to assets etc. After invoking the request, the account receives the data in a json format via e-mail.

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
password
required
string

Password of the current logged in user

Responses

Request samples

curl -X POST https://services.inplayer.com/accounts/export \
  -H 'authorization: Bearer Access-Token' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d password=123456 \

Response samples

Content type
application/json
{
  • "message": "Your data has been successfully exported. You will receive an email shortly.",
  • "code": 200
}

Creates forgot password token

The first step in change password functionality. After this call, you will receive a valid token for password reset, via email. Then you will need to complete the change password operation with the provided token.

Request Body schema: application/x-www-form-urlencoded
merchant_uuid
required
string

The UUID of the parent merchant account

email
required
string

The email address of the account.

Responses

Request samples

curl https://services.inplayer.com/accounts/forgot-password \
  -d email=example@mail.com \
  -d merchant_uuid="507d866c-4e33-445d-b027-f163d0099f54"

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Please check your email"
}

Updates password

Using the generated forgot password token, you can call this method to update your password.

path Parameters
token
required
string

The generated token sent to your email address

Request Body schema: application/x-www-form-urlencoded
password
required
string <password>

The new password of the account.

password_confirmation
required
string <password>

The password confirmation.

branding_id
integer

optional branding ID in case branding themes feature is used

Responses

Request samples

curl -X PUT https://services.inplayer.com/accounts/forgot-password/{token} \
      -d password=secret \
      -d password_confirmation=secret

Response samples

Content type
application/json
{
  • "code": 422,
  • "message": "Invalid input",
  • "errors": {
    }
}

Impersonate

Login as one of master's followers

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
sign_in_as
required
integer

Follower's account id

uuid
required
string

Merchant's uuid of the follower

client_id
required
string
email
required
string

Email address of the follower you want to log in

grant_type
required
string
Value: "social"

Grant type

password
required
string

Password of the current logged user

Responses

Request samples

curl -X POST https://services.inplayer.com/accounts/impersonate \
  -H 'authorization: Bearer Access-Token' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d sign_in_as=123 \
  -d email="john@example.com" \
  -d grant_type="social" \
  -d client_id="528b1b80-5868-4abc-a9b6-4d3455d719c8" \
  -d uuid="528b1b80-5868-4abc-a9b6-4d3455d719c8&password=inplayer123" \

Response samples

Content type
application/json
{
  • "master_id": 21,
  • "follower_id": 123,
  • "scopes": [
    ],
  • "created_at": 1531482438
}

Sign out

Account logout

Authorizations:
bearerAuth

Responses

Request samples

curl https://services.inplayer.com/accounts/logout \
    -H "Authorization: Bearer <token>"

Response samples

Content type
application/json
{
  • "code": 401,
  • "message": "Invalid auth token"
}

Create follower merchant account

Creates a follower merchant account that can inherit merchant settings such as scopes and payment methods.

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
One of
follower_id
integer

The account ID of the follower merchant (needed for an existing account)

scopes
Array of strings

Set of actions or settings that the master account provides for the follower

Array of objects

The payment methods that can either be active or inactive, as determined by the master merchant

Responses

Request samples

curl -X POST https://services.inplayer.com/accounts/merchants \
  -H 'authorization: Bearer Access-Token' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d full_name="John Doe" \
  -d email="john@example.com" \
  -d password="foobar123" \
  -d master_id=123 \
  -d scopes[0]="inheritance" \
  -d methods[12]=true \

Response samples

Content type
application/json
{
  • "access_token": "eyJhbGciOiJIUzI1NiIsInUj6CI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  • "account": {
    }
}

Update master-follower relation

Updates followers’ settings (scopes and methods).

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
follower_id
required
integer

Follower's account id

scopes
required
Array of strings

The set of settings and actions the master merchant is updating for their follower

Array of objects

Responses

Request samples

curl -X PUT https://services.inplayer.com/accounts/merchants/relation \
  -H 'authorization: Bearer Access-Token' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d follower_id=123 \
  -d scopes[0]="inheritance" \
  -d methods[7]=false \

Response samples

Content type
application/json
{
  • "master_id": 21,
  • "follower_id": 123,
  • "scopes": [
    ],
  • "created_at": 1531482438
}

Delete master-follower relation

Deletes master-follower relation

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
follower_id
required
integer

Follower's account id

Responses

Request samples

curl -X DELETE https://services.inplayer.com/accounts/merchants/relation \
  -H 'authorization: Bearer Access-Token' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d follower_id=123 \

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Deleting relation was successful."
}

Post register field

Creates new register field

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
name
string

register field name

label
string

register field label

type
string

register field type

default_value
string

register field default value

placeholder
string

register field placeholder

required
integer

register field required

Responses

Request samples

curl -X POST https://services.inplayer.com/accounts/register-field \
  -H "Authorization: Bearer <token>" \
  -d name="Foo" \
  -d label="Bar" \
  -d type="Foo Bar" \
  -d default_value="Foobar" \
  -d placeholder="Baz" \
  -d required=1

Response samples

Content type
application/json
{
  • "code": 201,
  • "message": "Successfully Created.",
  • "id": 2
}

Update register field

Updates register field

Authorizations:
bearerAuth
Request Body schema: application/x-www-form-urlencoded
id
required
integer

register field id

name
string

register field name

label
string

register field label

type
string

register field type

default_value
string

register field default value

placeholder
string

register field placeholder

required
integer

register field required

Responses

Request samples

curl -X PUT https://services.inplayer.com/accounts/register-field \
  -H "Authorization: Bearer <token>" \
  -d id=123 \
  -d name="Foo" \
  -d label="Bar" \
  -d type="Foo Bar" \
  -d default_value="Foobar" \
  -d placeholder="Baz" \
  -d required=1

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Update Successful.",
  • "id": 2
}

Delete register field

Authorizations:
bearerAuth
path Parameters
id
required
integer

Register field id

Responses

Request samples

curl -X DELETE https://services.inplayer.com/accounts/register-field/{id} \
  -H "Authorization: Bearer <token>" \

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Field was successfully deleted."
}

Get register fields

path Parameters
merchant_uuid
required
string <uuid>
Example: 528b1b80-5868-4abc-a9b6-4d3455d719c8

Merchant uuid

Responses

Request samples

curl -X GET https://services.inplayer.com/accounts/register-fields/{merchant_uuid}

Response samples

Content type
application/json
{
  • "id": 44,
  • "name": "gender",
  • "label": "Gender",
  • "type": "select",
  • "required": true,
  • "default_value": "male",
  • "placeholder": "Gender",
  • "options": [
    ]
}

Get registered users

Returns a collection of registered users

query Parameters
search
Array of arrays

Search by title, id, merchant_id or merchant_uuid. e.g. ?search[]=title:exampleTitle

page
integer

Page number

size
integer

Number of results

active
string

Only active or all users

Responses

Request samples

curl https://services.inplayer.com/accounts/registered-users \
    -H "Authorization: Bearer <token>"

Response samples

Content type
application/json
{
  • "total": 1599,
  • "collection": [
    ]
}

Get List of Social URLs

Returns list of social button URLs

Authorizations:
bearerAuth
query Parameters
state
required
string
Example: state=eyJjbJulbnR0dHA6Ly9sb2NskOvc3Q6ODA4MC8/aXB3PTEmYXNzZXRfaWS9sMDczNzQifQ==

State token from the social service

Responses

V2

Returns account information

Returns all the relevant information about a given account.

Authorizations:
bearerAuth

Responses

Request samples

curl https://services.inplayer.com/v2/accounts \
  -H "Authorization: Bearer <token>"

Response samples

Content type
application/json
{
  • "id": 21,
  • "uuid": "528b1b80-5868-4abc-a9b6-4d3455d719c8",
  • "merchant_uuid": "528b1b80-5868-4abc-a9b6-4d3455d719c8",
  • "email": "example-email@inplayer.com",
  • "full_name": "John Doe",
  • "referrer": "https://inplayer.com",
  • "metadata": { },
  • "social_apps_metadata": [
    ],
  • "roles": [
    ],
  • "completed": true,
  • "date_of_birth": 1531482438,
  • "created_at": 1531482438,
  • "updated_at": 1531482438,
  • "expired_at": 1531482438
}

Create an account

Registers a new InPlayer account.

Request Body schema: application/x-www-form-urlencoded
full_name
required
string

The first and last name of the merchant

username
required
string

The email address of the merchant

password
required
string <password>

Password containing minimum 8 characters

password_confirmation
required
string <password>

The same password with minimum 8 characters

type
required
string

Account type. Example: consumer

grant_type
string

The type of grant required to gain access token. Example: password

client_id
required
string <string>

The merchant's OAuth application ID

referrer
string

The request’s source URL

date_of_birth
string <date-time>

Customer's birthdate Unix timestamp; conditionally required in case the merchant has enabled the 'age verification' feature.

Array of objects

Responses

Request samples

curl -X POST https://services.inplayer.com/v2/accounts \
-d full_name="John Doe" \
-d username=john@example.com \
-d password=foobar123 \
-d password_confirmation=foobar123 \
-d type=consumer \
-d grant_type=password \
-d client_id=507d866c-4e33-445d-b027-f163d0099f54 \
-d metadata[phone]=bar

Response samples

Content type
application/json
{
  • "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  • "expires_at": 1615381572,
  • "account": {
    }
}

Authenticate Account

Authenticates an account by creating an access token that can be used for future requests.

Request Body schema: application/x-www-form-urlencoded
One of
username
required
string

The email address of the account.

password
required
string <password>

The account password

grant_type
required
string
Value: "password"

Grant type

client_id
required
string

The Merchant's OAuth application ID

Responses

Request samples

curl -X POST https://services.inplayer.com/v2/accounts/authenticate \
  -d client_id="528b1b80-5868-4abc-a9b6-4d3455d719c8" \
  -d grant_type=password \
  -d client_secret=foobared

Response samples

Content type
application/json
{
  • "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  • "account": {
    }
}

Create a customer account

This endpoint allows a merchant, using their token to create a customer account

Request Body schema: application/x-www-form-urlencoded
email
required
string

The email address of the account

full_name
string

The first and last name of the account

password
string <password>

Password containing minimum 8 characters

referrer
string

The request’s source URL

Array of objects

Responses

Request samples

curl https://services.inplayer.com/v2/accounts/customers \
  -H 'authorization: Bearer Access-Token' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d email=john@example.com \

Response samples

Content type
application/json
{
  • "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  • "expires": 1531482438,
  • "account": {
    }
}

Creating livelike account

Creates livelike account

Request Body schema: application/x-www-form-urlencoded
item_id
required
int
nickname
string

Nickname (Optional)

Responses

Request samples

curl -X POST https://services.inplayer.com/v2/accounts/external/livelike  \
  -H 'authorization: Bearer Access-Token' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d item_id=123 \
  -d nickname=john

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully created livelike account."
}

Updating livelike account

Updates livelike account

Request Body schema: application/x-www-form-urlencoded
nickname
required
string

Responses

Request samples

curl -X PATCH https://services.inplayer.com/v2/accounts/external/livelike  \
  -H 'authorization: Bearer Access-Token' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d nickname=john

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Successfully updated livelike account."
}

Impersonate an Account

Logs the master in as one of their followers.

Request Body schema: application/x-www-form-urlencoded
One of
customer_id
required
int

The ID of the customer's account (required when the operation is invoked by a merchant).

Responses

Request samples

curl https://services.inplayer.com/v2/accounts/impersonate \
  -H 'authorization: Bearer Access-Token' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d customer_id=20456 \

Response samples

Content type
application/json
{
  • "access_token": null,
  • "expires": 1531482438,
  • "account": {
    }
}

Send pin code

Creates pin code and sends it to your email

Request Body schema: application/x-www-form-urlencoded
branding_id
int

Branding ID (optional, in case branding themes feature is used)

Responses

Request samples

curl https://services.inplayer.com/v2/accounts/pin-codes/send
  -H "Authorization: Bearer <token>"
  -d "branding_id=1"

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "Please check your email for your pin code."
}

Validate pin code

Checks validity of pin code

Request Body schema: application/x-www-form-urlencoded
pin_code
required
string

The code a customer needs to enter in order to be able to watch the content behind the paywall, as an additional authentication step. The pin code is automatically sent to the customer via email, as soon as they log into the paywall.

Responses

Request samples

curl https://services.inplayer.com/v2/accounts/pin-codes/validate
  -H "Authorization: Bearer <token>"
  -d 'pin_code=A5RS2'

Response samples

Content type
application/json
{
  • "code": 200,
  • "message": "The pin code is valid"
}