이 섹션에서는 로그인 작업을 위한 API 호출에 대해 설명합니다. 요청을 전송하기 전에 관리자 페이지에서 로그인 프로젝트를 설정해야 합니다.
The full list of IP addresses that login.xsolla.com may use:
Are the restrictions applied by Xsolla API on the frequency of access by a user within a defined timeframe.
섀도우 로그인 프로젝트에서 생성하고 명확한 퍼블리싱 플랫폼에 연결한 계정 유형입니다. 플랫폼 계정은 다른 플랫폼 계정에 연결할 수 없습니다. 또한 기본 계정에서 계정 연결을 해제할 수 없습니다.
로그인 API는 다음 토큰 유형을 지원합니다.
인증 체계에 따라 API 호출이 클라이언트 측인지 서버 측인지 확인할 수 있습니다:
Authorization
header: Bearer <user_JWT>
header,
where <user_JWT>
— is the user token.X-SERVER-AUTHORIZATION: <server_JWT>
, where
<server_JWT>
— is the server token.토큰을 가져오려면 다음 요청 중 하나를 전송합니다.
JWT 인증 후 사용자는 <Callback URL>?token=<User token (JWT)>
쿼리 매개 변수로 된 토큰이 있는 콜백
URL로 리디렉션됩니다.
OAuth 2.0 프로토콜 기반 인증 후 JWT
생성 요청을 엑솔라 로그인
서버로 전송하여 수신한 code
매개 변수를 사용자 토큰(access_token
)으로 교환합니다.
서버 토큰을 가져오는 방법:
애플리케이션의 백엔드에서 Generate JWT API 호출을 사용하여 서버 JWT를 가져오는 메서드를 구현합니다. 요청에는 다음 매개 변수가 포함되어야 합니다.
grant_type
is the type of getting JWT, pass the client_credentials
value.client_secret
is the secret key that is received when you set up the server
OAuth 2.0 client.client_id
is the client ID received when you set up the server OAuth 2.0
client.To prevent Xsolla system overloads and protect against sudden spikes in
incoming traffic, Xsolla limits the number of requests received by the Xsolla
API within a specified period of time. If the limit is exceeded, the Xsolla API
returns an HTTP response with the 429
status code.
Rate limits vary by method, IP-address, authentication scheme, and other factors.
Rate limits for server-side methods are applied to methods with server-side
authentication — methods that are called with the X-SERVER-AUTHORIZATION:
<server_JWT>
header, where <server_JWT>
is the server
token.
Rate limits for client-side methods are applied to methods without
authentication or with client-side authentication — methods that are called
with the Authorization: Bearer <user_JWT>
header, where
<user_JWT>
is the user token.
Example of a method with server-side authentication: Example of a method with client-side authentication:
Rate limits for client-side methods do not change and are necessary to prevent brute-force attacks. The maximum request rate for server-side methods is higher than for client-side methods. You can refer to the recommendations on how to manage rate limits in the documentation.
모든 토큰은 JWT 형식을 가지며 페이로드에 명확한 정보를 포함합니다.
사용자 JWT는 인증 또는 등록의 결과로 수신한 토큰입니다. 토큰 페이로드에는 사용자 및 인증 호출에 대한 정보가 포함됩니다.
OAuth 2.0 프로토콜을 통해 사용자 토큰을 가져오려면 OAuth 2.0 클라이언트가 필요합니다. 사용자 토큰은
Authorization: Bearer <JWT>
헤더에서 전달됩니다.
토큰은 인증 또는 이메일 주소 확인 후 기본 클레임을 포함하게 됩니다. 이러한 클레임의 존재는 사용자 데이터베이스 및 인증 호출에 의존하지 않습니다.
클레임 | 유형 | 필수 | 설명 |
exp |
Unix 타임스탬프 | 예 | 토큰 만료 날짜 및 시간입니다. 기본 만료 시간은 24시간입니다. 모든 로그인 프로젝트의 만료 시간을 변경할 수 있습니다. |
iss |
string | 예 | 토큰에 서명한 서비스: https://login.xsolla.com . |
iat |
Unix 타임스탬프 | 예 | 토큰을 제공하는 날짜 및 시간입니다. |
sub |
string(UUID) | 예 | 엑솔라 로그인 서버 측에 기록된 사용자 ID. |
groups |
array | 예 |
사용자가 속한 그룹 목록입니다. 모든 그룹은 다음 형식으로 작성됩니다.
하나의 기본 그룹만 있을 수 있습니다. 이 그룹은 초기에 다른 그룹으로 배포되기 전의 모든 사용자를 포함합니다. |
xsolla_login_project_id |
string(UUID) | 예 | 로그인 프로젝트 ID입니다. |
type |
string |
인증 옵션:
하나의 기본 그룹만 있을 수 있습니다. 이 그룹은 초기에 다른 그룹으로 배포되기 전의 모든 사용자를 포함합니다. |
|
avatar |
string | 사용자 아바타 URL입니다. | |
username |
string | 사용자 이름입니다. | |
publisher_id |
integer | 로그인 프로젝트를 소유한 판매자의 ID입니다. | |
email |
string | 사용자 이메일 주소입니다. | |
payload |
string | 인증을 진행하는 동안 페이로드 매개 변수에서 전달되는 추가 정보입니다. | |
promo_email_agreement |
boolean |
다음 값 중 하나일 수 있습니다.
true 값을 가짐.
로그인 위젯의 등록 양식에 기능을 추가하는 방법:
|
|
connection_information |
string | 사용자가 생년월일을 확인했는지 여부를 표시합니다. 확인은 okname 서비스를 통해 진행합니다. |
PlayFab 저장소를 사용하는 경우 인증 후 토큰에 포함된 클레임입니다.
클레임 | 유형 | 필수 | 설명 |
external_account_id |
string | 예 | 사용자 PlayFab ID입니다. |
session_ticket |
string | 예 |
인증 요청 또는 PlayFab API에 대한 요청을 진행하는 동안 수신한 SessionTicket 매개 변수입니다. OAuth 2.0 프로토콜을 통해 사용자를 인증하고 |
entity_token |
string | 예 | EntityToken.EntityToken 매개 변수입니다. |
entity_type |
string | 예 | EntityToken.Entity.Type 매개 변수입니다. title_player_account 값만 가질 수 있습니다. |
entity_id |
string | 예 | EntityToken.Entity.Id 매개 변수입니다. |
사용자 정의 저장소를 사용하는 경우 인증 후 토큰에 포함된 클레임입니다.
클레임 | 유형 | 필수 | 설명 |
provider |
string | 예 | 인증에 사용되는 소셜 네트워크의 이름입니다. 사용자가 사용자 이름과 암호를 통해 인증하는 경우 클레임은 xsolla 값을 갖습니다. |
external_account_id |
string | 서버 측의 사용자 ID입니다. | |
partner_data |
Data of any type returned by your server in the response body during authentication. To enable the transmission of this claim, contact your Customer Success Manager or email to csm@xsolla.com | ||
social_access_token |
Access token of the social network through which the user was authenticated. To enable the transmission of this claim, contact your Customer Success Manager or email to csm@xsolla.com. |
소셜 네트워크를 통한 인증 후에 토큰에 포함된 클레임입니다. 이러한 클레임의 존재는 사용자 데이터베이스에 의존하지 않습니다.
클레임 | 유형 | 필수 | 설명 |
provider |
string | 예 | 인증에 사용된 SNS 이름. |
id |
string | 예 | 소셜 네트워크의 사용자 ID입니다. |
is_cross_auth |
boolean | 암묵 인증 요청이 진행 중임을 표시합니다. | |
social_access_token |
string | 인증에 사용하는 소셜 네트워크 계정 access_token 매개 변수입니다. 이 기능을 설정하려면 계정 관리자에게 문의해야 합니다. |
|
picture |
string(URL) | 소셜 네트워크의 사용자 프로필 사진에 연결합니다. | |
birthday |
date(RFC3339) | 소셜 네트워크의 사용자 생년월일입니다. | |
gender |
string | 소셜 네트워크의 사용자 성별입니다. | |
name |
string | 소셜 네트워크의 사용자 별명입니다. |
전화번호를 통한 인증 후 토큰에 포함된 클레임입니다.
클레임 | 유형 | 필수 | 설명 |
phone_number |
string | 예 | 인증에 사용되는 사용자의 전화번호입니다. 구분선 없이 국가 코드, 지역 번호 및 줄 번호를 기반으로 하는 전화번호 형식입니다. |
서버 토큰은 X-SERVER-AUTHORIZATION
헤더에서 전달됩니다.
토큰 페이로드에는 OAuth 2.0 클라이언트가 소유한 리소스에 대한 정보가 포함되어 있습니다. 토큰은 이러한 리소스에 대한 서버 기반 인증을 사용하여 호출에 액세스할 수 있습니다.
클레임 | 유형 | 필수 | 설명 |
xsolla_login_project_id |
string(UUID) | 예 | OAuth 2.0 클라이언트를 소유한 로그인 프로젝트의 ID입니다. |
resources |
array | 예 |
OAuth 2.0 클라이언트가 소유한 리소스의 목록입니다. 가능한 리소스 유형:
모든 그룹은 다음 형식으로 작성됩니다.
|
jti |
string | 예 | 고유 토큰 ID입니다. |
To validate the JWT, use the following Login API calls:
주의
비밀 키를 누구에게도 알려주어선 안 됩니다. 손상된 경우 업데이트해야 합니다.
오류 응답이 있는 경우 엑솔라 로그인 서버는 다음 필드가 있는 JSON 개체를 반환합니다.
필드 | 유형 | 설명 |
code | string | 엑솔라 로그인 서버 오류 코드입니다. |
description | string | 오류 설명입니다. 텍스트는 항상 영어로 되어 있습니다. 오류가 발생할 경우 나중에 값이 변경될 수 있으므로 이 텍스트를 사용해선 안 됩니다. |
{
"error": {
"code": "000-000",
"description": "description"
}
}
Error Code | 설명 | Recommendation |
---|---|---|
002-016 | The user should try to log in again. | |
002-027 | Make sure all request parameters are correct. | |
002-028 | Make sure all required parameters are provided. | |
002-040 | The user should contact the game support team. | |
002-043 | The user should try another phone number that can receive SMS. | |
002-050 | The error occurs when trying to enable two-factor authentication if it's already enabled, or disable it if it's already disabled. | |
002-056 | The user should verify the phone number or enter a different one. | |
002-057 | The user should try again later. If you believe this error should not occur, please contact the integrator team in any messenger. | |
002-058 | The user should use the link in the email to unblock their account or reset the password. | |
002-060 | Inform the user of the age restrictions. | |
003-001 | The user should verify the entered information and try again. | |
003-002 | The user should sign up in the game to continue. | |
003-003 | The user should try a different username. | |
003-004 | The user should use a different email address. | |
003-005 | The user should try a different email address. | |
003-007 | The user should confirm their email address to activate the account. If they haven't received a confirmation email, they should check the spam folder. | |
003-008 | Changing the email address is not allowed. | |
003-009 | The search failed for technical reasons, please try again later. | |
003-010 | Changing the birth date is not allowed. | |
003-011 | The user should confirm the email address or use another one that has not been previously used during registration. | |
003-012 | The user should confirm the phone number or use another one that has not been previously used during registration. | |
003-019 | Check the existence of the authentication variant with the passed ID. | |
003-020 | Check the authorization option settings in your Publisher Account. | |
003-021 | The user should contact game support. | |
003-022 | Verify the authorization option settings in your Publisher Account. | |
003-023 | Registration is not allowed for this authorization option. The user should contact game support. | |
003-030 | The password reset link has expired or is incorrect. The user should attempt to reset the password again. | |
003-049 | The user should try again later. | |
007-001 | The user should use an alternative login method. | |
008-001 | Add the correct login URL in the authorization option settings in your Publisher Account (section User database > Storage > Custom storage). | |
008-002 | Add the correct user verification URL in the authorization option settings in your Publisher Account (section User database > Storage > Custom storage). | |
008-003 | Add the correct URL in the authorization option settings in your Publisher Account (section User database > Storage > Custom storage). | |
008-004 | Add the correct password reset URL in the authorization option settings in your Publisher Account (section User database > Storage > Custom storage). | |
008-005 | Ensure the correct Title ID is specified in the authorization option settings in your Publisher Account (section User database > Storage). | |
008-006 | Ensure the PlayFab API key is valid. | |
008-008 | Ensure the server returns the accountID parameter in the response body. |
|
008-009 | Verify the URLs specified in the Custom storage settings in the authorization option in your Publisher Account (section User database > Storage > Custom storage). | |
008-011 | Ensure that the callback URL for password reset is specified in the authorization option settings in your Publisher Account (section Password settings). | |
008-013 | Ensure that a link to the user agreement is specified in the authorization option settings in your Publisher Account (section Legal Terms > Policies and Agreements). | |
008-014 | Contact the integration team through any messenger. | |
008-015 | Contact the integration team through any messenger. | |
008-016 | Add the API key to the settings in your Publisher Account (section Legal Terms > Policies and Agreements). | |
010-004 | The user should try again later. | |
010-005 | The user should try again later. | |
010-006 | The user should add another authentication method before unlinking the social network. | |
010-007 | The user should complete the CAPTCHA again. | |
010-010 | The user should verify the code and try again. | |
010-014 | The user should log in again from the login page. | |
010-015 | The user should try again later. | |
010-016 | The user should use a different social account. If they believe this is an error, they should contact the integration team through any messenger. | |
010-017 | Verify the correctness of the request parameters being sent. | |
010-019 | Ensure that a client with the provided client_id exists. |
|
010-020 | Ensure that the provided scope parameter is correct. Refer to the instructions for detailed setup information. |
|
010-021 | Ensure that the value of the response_type parameter is set to "code" . |
|
010-022 | Ensure that the state parameter is present and consists of at least 8 characters. | |
010-023 | Ensure that the authorization code is valid and not expired, and that the redirect_uri parameter contains an authorized URL. Refer to the instructions for detailed setup information. |
|
010-026 | Ensure that you have sufficient permissions to access the resource. | |
010-030 | Ensure that cross-authentication is enabled for the authorization option. Refer to the instructions for detailed setup information. | |
010-031 | The error occurs when attempting to connect a social network that is already enabled. | |
010-032 | Ensure that the social network is enabled and configured in the authorization option settings in your Publisher Account (section Authorization via Social Networks). | |
010-033 | The user should try again later. | |
010-035 | The user should try again later. | |
010-045 | The user should use a different social account for registration. | |
030-024 | The user should contact the game support team. | |
040-001 | The user should enter an email address containing no more than 254 characters. | |
040-002 | The user should enter a valid email address. | |
040-003 | The user should enter a different email address. | |
040-004 | The user should contact Xsolla support. | |
040-005 | The user should enter an email with only one @ character. |
|
040-006, 040-007, 040-008 | The user should contact Xsolla support. | |
040-009 | The user should enter an email with an existing domain. | |
040-010 | The user should contact Xsolla support. | |
010-018 | The user should enter a different email address. | |
300-003 | The user should try again later. | |
300-005 | The user should try again later. | |
300-006 | The user should verify and re-enter the confirmation code. | |
300-008 | The user should use the new code sent to their email or phone. | |
003-007 | The user should confirm their email address to activate the account. If they haven't received a confirmation email, they should check the spam folder. | |
003-025 | The user should try a different authentication method. | |
003-040 | The user should log in again. | |
003-033 | Ensure that shadow authentication is used for the authorization option. | |
2002-0001 | Make sure that the attribute being created has not been previously added to the user. |