Overview
Account linkage is the mechanism that allows FACEIT and external platforms to communicate with each other. For example, FACEIT can redeem a platform voucher without involving a user.
The Account linkage works the following way:
Authorization
It requires implementing OpenID Connect 2.0 specification.
We will use authorization code flow, for that we need:
- Authorization endpoint for user authentication
- Token endpoint to exchange an authorization code for an access token and refresh the access token
- User info endpoint to get user information
We use client_secret_basic for client authorization and https://api.faceit.com/account-integration/v1/platforms/{partner}/redirect as a redirect URI for production.
Sending code
After successful authorization, we will redeem a voucher by making an HTTP request.
Endpoint
Method | URL | Description |
---|---|---|
POST | https://<your domain>/codes/apply | This POST request is used to redeem a voucher. |
Header *(required)
Content-Type
- application/jsonAuthorization: Brearer <access token>
- We use Brearer authentication.access token
- user access token that we got after authorization.
Data (JSON format)
Request body with following params:
param name | Description | Type |
---|---|---|
code | Code for redeeming | string |
POST https://<your domain>/codes/apply
Authorization: Bearer <access token>
Content-Type: application/json
{
"code": "CODE"
}
Response
param name | Description | Type |
---|---|---|
code | A human-readable error code used to identify the error that occurred. | string |
message | A detailed error message. | string |
{
"code": "invalid_code",
"message": "code was already redeemed"
}
Limitation
Please be aware that each integration must be linked to a specific organizer responsible for prize distribution. If you have multiple CRMs due to geographical restrictions or other factors, they will need to be associated with separate organizers, leading to divided competitions. Therefore, we recommend consolidating all your user data into a single CRM to simplify management and avoid splitting the competitions.
How to initiate Account linkage integration
What do you need?
- OAuth2 parameters for stage and production
- Client ID
- Client secret
- Scope (if it is required to get user info) 2.Endpoints
- Authorization endpoint
- Token endpoint
- User info endpoint
- The endpoint to send a voucher with a list of possible errors