ログイン API v2.0

概要

当セクションでは、ログインと機能するメソッドを説明します。リクエストを送る前に、ログインをパブリッシャーアカウントで設定してください。

ユーザーデータをお客様側で保存している場合は、プロキシリクエストを使用してください。

エンドポイントのパス:https://login.xsolla.com/api

JWT承認

秘密鍵で署名したJWTは、ユーザーを認証するごとに生成されます。JWTが失効せずプロジェクト内のユーザーへしっかり付属するように、値を有効にしてください。

JWTを有効にする方法:

  1. ライブラリを選択してサーバー側のアプリと接続する。
  2. パブリッシャーアカウント > ログイン設定 > 基本設定 > 秘密鍵の順に開いて、秘密鍵の値をコピーする。
  3. 秘密鍵を承認関数にペーストする。

Notice: 秘密鍵は誰にも教えないでください。秘密鍵が危険に晒されている場合は鍵を更新しましょう。

認証

ユーザーの登録

新規ユーザーをデータベースに登録します。ユーザーには、指定したメール宛にアカウントの確認メッセージを送信します。

HTTPリクエスト

POST https://login.xsolla.com/api/user?projectId={projectId}&login_url={login_url}

パラメータ 種類 説明文
projectId
string パブリッシャーアカウントのログインID。 必須。
login_url
string アカウント確認後に、追加パラメータを持つリンクを生成し、ユーザーをリダイレクトするURL。ログイン設定のパブリッシャーアカウントで指定したコールバックURLと同じURLにしてください。複数のコールバックURLがある場合は必須です。
username
string ユーザー名。 必須。
password
string パスワード。 必須。
email
string メールアドレス。 必須。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
リクエスト
POST https://login.xsolla.com/api/user?login_url=https://example.com&projectId={projectId}

Headers:
  Content-Type: application/json

Body:
  {
  "username": "John",
  "password": "password123",
  "email": "john-email@email.com"  
}
curl --request POST \
  --url 'https://login.xsolla.com/api/user?projectId={projectId}&login_url=https%3A%2F%2Fexample.com' \
  --header 'content-type: application/json' \
  --data '{"username":"John","password":"password123","email":"john-email@email.com"}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"username":"John","password":"password123","email":"john-email@email.com"}');

$request->setRequestUrl('https://login.xsolla.com/api/user');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setQuery(new http\QueryString(array(
  'projectId' => '{projectId}',
  'login_url' => 'https://example.com'
)));

$request->setHeaders(array(
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://login.xsolla.com/api/user?projectId={projectId}&login_url=https%3A%2F%2Fexample.com");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"username\":\"John\",\"password\":\"password123\",\"email\":\"john-email@email.com\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("login.xsolla.com")

payload = "{\"username\":\"John\",\"password\":\"password123\",\"email\":\"john-email@email.com\"}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/api/user?projectId={projectId}&login_url=https%3A%2F%2Fexample.com", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://login.xsolla.com/api/user?projectId={projectId}&login_url=https%3A%2F%2Fexample.com")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"username\":\"John\",\"password\":\"password123\",\"email\":\"john-email@email.com\"}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"username\":\"John\",\"password\":\"password123\",\"email\":\"john-email@email.com\"}");
Request request = new Request.Builder()
  .url("https://login.xsolla.com/api/user?projectId={projectId}&login_url=https%3A%2F%2Fexample.com")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "username": "John",
  "password": "password123",
  "email": "john-email@email.com"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://login.xsolla.com/api/user?projectId={projectId}&login_url=https%3A%2F%2Fexample.com");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);
レスポンス

ユーザー名とパスワードで認証

ユーザーは指定されたユーザー名とパスワードで認証します。

レスポンスtokenパラメータとremember_meパラメータを持つURLで、認証完了後にユーザーをリダイレクトします。

HTTPリクエスト

POST https://login.xsolla.com/api/login?projectId={projectId}&login_url={login_url}

パラメータ 種類 説明文
projectId
string パブリッシャーアカウントのログインID。 必須。
login_url
string 認証完了後に、追加パラメータを持つリンクを生成し、ユーザーをリダイレクトするURL。ログイン設定のパブリッシャーアカウントで指定したコールバックURLと同じURLにしてください。複数のコールバックURLがある場合は必須です。
username
string ユーザー名。 必須。
password
string パスワード。 必須。
remember_me
boolean ユーザーが認証データの保存に同意するかどうか。デフォルトは'false'。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
リクエスト
POST https://login.xsolla.com/api/login?login_url=https://example.com&projectId={projectId}

Headers:
  Content-Type: application/json

Body:
  {
  "username": "Jane",
  "password": "123456",
  "remember_me": true
}
curl --request POST \
  --url 'https://login.xsolla.com/api/login?projectId={projectId}&login_url=https%3A%2F%2Fexample.com' \
  --header 'content-type: application/json' \
  --data '{"username":"Jane","password":"123456","remember_me":true}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"username":"Jane","password":"123456","remember_me":true}');

$request->setRequestUrl('https://login.xsolla.com/api/login');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setQuery(new http\QueryString(array(
  'projectId' => '{projectId}',
  'login_url' => 'https://example.com'
)));

$request->setHeaders(array(
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://login.xsolla.com/api/login?projectId={projectId}&login_url=https%3A%2F%2Fexample.com");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"username\":\"Jane\",\"password\":\"123456\",\"remember_me\":true}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("login.xsolla.com")

payload = "{\"username\":\"Jane\",\"password\":\"123456\",\"remember_me\":true}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/api/login?projectId={projectId}&login_url=https%3A%2F%2Fexample.com", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://login.xsolla.com/api/login?projectId={projectId}&login_url=https%3A%2F%2Fexample.com")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"username\":\"Jane\",\"password\":\"123456\",\"remember_me\":true}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"username\":\"Jane\",\"password\":\"123456\",\"remember_me\":true}");
Request request = new Request.Builder()
  .url("https://login.xsolla.com/api/login?projectId={projectId}&login_url=https%3A%2F%2Fexample.com")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "username": "Jane",
  "password": "123456",
  "remember_me": true
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://login.xsolla.com/api/login?projectId={projectId}&login_url=https%3A%2F%2Fexample.com");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);
レスポンス
{
  "login_url": "https://example.com?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NDg3NTcyODEsImlzcyI6Imh0dHBzOlwvXC9sb2dpbi54c29sbGEuY29tIiwiaWF0IjoxNTQ4NjcwODgxLCJ1c2VybmFtZSI6IkphbmUiLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6InV0Nmt0alNNbDFja2ZKZVpLVkJJYlNuQTE5a1hWdDJwX1VGT1J2T2RlUjQiLCJzdWIiOiI2NjAwYTZhZS0yMmU2LTExZTktOTE0Yy00MjAxMGFhODAwMTciLCJlbWFpbCI6ImJvZ29mZUBvbmVjaXR5bWFpbC5jb20iLCJ0eXBlIjoieHNvbGxhX2xvZ2luIiwieHNvbGxhX2xvZ2luX3Byb2plY3RfaWQiOiI1MDkzYzliMy0xZDVlLTExZTktOTI0NC00MjAxMGFhODAwMDQiLCJwdWJsaXNoZXJfaWQiOjc5MDE3fQ.AZg1bPEZCNNd0oxskmwwoF6tKX3KXldX7uy_8a-jRZk&remember_me=true"
}
{
  "login_url": "https://example.com?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NDg3NTcyODEsImlzcyI6Imh0dHBzOlwvXC9sb2dpbi54c29sbGEuY29tIiwiaWF0IjoxNTQ4NjcwODgxLCJ1c2VybmFtZSI6IkphbmUiLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6InV0Nmt0alNNbDFja2ZKZVpLVkJJYlNuQTE5a1hWdDJwX1VGT1J2T2RlUjQiLCJzdWIiOiI2NjAwYTZhZS0yMmU2LTExZTktOTE0Yy00MjAxMGFhODAwMTciLCJlbWFpbCI6ImJvZ29mZUBvbmVjaXR5bWFpbC5jb20iLCJ0eXBlIjoieHNvbGxhX2xvZ2luIiwieHNvbGxhX2xvZ2luX3Byb2plY3RfaWQiOiI1MDkzYzliMy0xZDVlLTExZTktOTI0NC00MjAxMGFhODAwMDQiLCJwdWJsaXNoZXJfaWQiOjc5MDE3fQ.AZg1bPEZCNNd0oxskmwwoF6tKX3KXldX7uy_8a-jRZk&remember_me=true"
}
"login_url": "https://example.com?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NDg0MTE2NTcsImlzcyI6Imh0dHBzOlwvXC9sb2dpbi54c29sbGEuY29tIiwiaWF0IjoxNTQ4MzI1MjU3LCJ1c2VybmFtZSI6ImdpbW9idSIsInhzb2xsYV9sb2dpbl9hY2Nlc3Nfa2V5IjoiLXIzQ1lZWHBkcGRrV3o0MUNuM1A2a1V4N1IwaDZneUlOSExqTE1zd2FScyIsInN1YiI6IjhhZmMzMTFlLTFkNjItMTFlOS05OWFkLTQyMDEwYWE4MDAyMSIsImVtYWlsIjoiZ2ltb2J1QG9uZWNpdHltYWlsLmNvbSIsInR5cGUiOiJ4c29sbGFfbG9naW4iLCJ4c29sbGFfbG9naW5fcHJvamVjdF9pZCI6IjUwOTNjOWIzLTFkNWUtMTFlOS05MjQ0LTQyMDEwYWE4MDAwNCIsInB1Ymxpc2hlcl9pZCI6NzkwMTd9.PgB_vMhzUuXYkf1FY0vaI8a3HzrH5R3G-I6t3PpH_bM&remember_me=true"
{
  "login_url": "https://example.com?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NDg3NTcyODEsImlzcyI6Imh0dHBzOlwvXC9sb2dpbi54c29sbGEuY29tIiwiaWF0IjoxNTQ4NjcwODgxLCJ1c2VybmFtZSI6IkphbmUiLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6InV0Nmt0alNNbDFja2ZKZVpLVkJJYlNuQTE5a1hWdDJwX1VGT1J2T2RlUjQiLCJzdWIiOiI2NjAwYTZhZS0yMmU2LTExZTktOTE0Yy00MjAxMGFhODAwMTciLCJlbWFpbCI6ImJvZ29mZUBvbmVjaXR5bWFpbC5jb20iLCJ0eXBlIjoieHNvbGxhX2xvZ2luIiwieHNvbGxhX2xvZ2luX3Byb2plY3RfaWQiOiI1MDkzYzliMy0xZDVlLTExZTktOTI0NC00MjAxMGFhODAwMDQiLCJwdWJsaXNoZXJfaWQiOjc5MDE3fQ.AZg1bPEZCNNd0oxskmwwoF6tKX3KXldX7uy_8a-jRZk&remember_me=true"
}
{
  "login_url": "https://example.com?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NDg3NTcyODEsImlzcyI6Imh0dHBzOlwvXC9sb2dpbi54c29sbGEuY29tIiwiaWF0IjoxNTQ4NjcwODgxLCJ1c2VybmFtZSI6IkphbmUiLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6InV0Nmt0alNNbDFja2ZKZVpLVkJJYlNuQTE5a1hWdDJwX1VGT1J2T2RlUjQiLCJzdWIiOiI2NjAwYTZhZS0yMmU2LTExZTktOTE0Yy00MjAxMGFhODAwMTciLCJlbWFpbCI6ImJvZ29mZUBvbmVjaXR5bWFpbC5jb20iLCJ0eXBlIjoieHNvbGxhX2xvZ2luIiwieHNvbGxhX2xvZ2luX3Byb2plY3RfaWQiOiI1MDkzYzliMy0xZDVlLTExZTktOTI0NC00MjAxMGFhODAwMDQiLCJwdWJsaXNoZXJfaWQiOjc5MDE3fQ.AZg1bPEZCNNd0oxskmwwoF6tKX3KXldX7uy_8a-jRZk&remember_me=true"
}
{
  "login_url": "https://example.com?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NDg3NTcyODEsImlzcyI6Imh0dHBzOlwvXC9sb2dpbi54c29sbGEuY29tIiwiaWF0IjoxNTQ4NjcwODgxLCJ1c2VybmFtZSI6IkphbmUiLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6InV0Nmt0alNNbDFja2ZKZVpLVkJJYlNuQTE5a1hWdDJwX1VGT1J2T2RlUjQiLCJzdWIiOiI2NjAwYTZhZS0yMmU2LTExZTktOTE0Yy00MjAxMGFhODAwMTciLCJlbWFpbCI6ImJvZ29mZUBvbmVjaXR5bWFpbC5jb20iLCJ0eXBlIjoieHNvbGxhX2xvZ2luIiwieHNvbGxhX2xvZ2luX3Byb2plY3RfaWQiOiI1MDkzYzliMy0xZDVlLTExZTktOTI0NC00MjAxMGFhODAwMDQiLCJwdWJsaXNoZXJfaWQiOjc5MDE3fQ.AZg1bPEZCNNd0oxskmwwoF6tKX3KXldX7uy_8a-jRZk&remember_me=true"
}
{
  "login_url": "https://example.com?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NDg3NTcyODEsImlzcyI6Imh0dHBzOlwvXC9sb2dpbi54c29sbGEuY29tIiwiaWF0IjoxNTQ4NjcwODgxLCJ1c2VybmFtZSI6IkphbmUiLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6InV0Nmt0alNNbDFja2ZKZVpLVkJJYlNuQTE5a1hWdDJwX1VGT1J2T2RlUjQiLCJzdWIiOiI2NjAwYTZhZS0yMmU2LTExZTktOTE0Yy00MjAxMGFhODAwMTciLCJlbWFpbCI6ImJvZ29mZUBvbmVjaXR5bWFpbC5jb20iLCJ0eXBlIjoieHNvbGxhX2xvZ2luIiwieHNvbGxhX2xvZ2luX3Byb2plY3RfaWQiOiI1MDkzYzliMy0xZDVlLTExZTktOTI0NC00MjAxMGFhODAwMDQiLCJwdWJsaXNoZXJfaWQiOjc5MDE3fQ.AZg1bPEZCNNd0oxskmwwoF6tKX3KXldX7uy_8a-jRZk&remember_me=true"
}
{
  "login_url": "https://example.com?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NDg3NTcyODEsImlzcyI6Imh0dHBzOlwvXC9sb2dpbi54c29sbGEuY29tIiwiaWF0IjoxNTQ4NjcwODgxLCJ1c2VybmFtZSI6IkphbmUiLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6InV0Nmt0alNNbDFja2ZKZVpLVkJJYlNuQTE5a1hWdDJwX1VGT1J2T2RlUjQiLCJzdWIiOiI2NjAwYTZhZS0yMmU2LTExZTktOTE0Yy00MjAxMGFhODAwMTciLCJlbWFpbCI6ImJvZ29mZUBvbmVjaXR5bWFpbC5jb20iLCJ0eXBlIjoieHNvbGxhX2xvZ2luIiwieHNvbGxhX2xvZ2luX3Byb2plY3RfaWQiOiI1MDkzYzliMy0xZDVlLTExZTktOTI0NC00MjAxMGFhODAwMDQiLCJwdWJsaXNoZXJfaWQiOjc5MDE3fQ.AZg1bPEZCNNd0oxskmwwoF6tKX3KXldX7uy_8a-jRZk&remember_me=true"
}

プロキシ認証

ユーザー登録をプロキシ

新規ユーザーをデータベースへ接続します。パブリッシャーアカウントのログイン設定で指定した新規ユーザーURLに対するリクエストをプロキシします。ユーザーが指定したメールアドレスに、確認メッセージが届きます。

HTTPリクエスト

POST https://login.xsolla.com/api/proxy/registration?projectId={projectId}&login_url={login_url}

パラメータ 種類 説明文
projectId
string パブリッシャーアカウントのログインID。 必須。
login_url
string メール確認後に、追加パラメータを持つリンクを生成し、ユーザーをリダイレクトするURL。ログイン設定のパブリッシャーアカウントで指定したコールバックURLと同じURLにしてください。複数のコールバックURLがある場合は必須です。
username
string ユーザー名。 必須。
password
string パスワード。 必須。
email
string メールアドレス。 必須。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
リクエスト
POST https://login.xsolla.com/api/proxy/registration?login_url=https://example.com&projectId={projectId}

Headers:
  Content-Type: application/json

Body:
  {
  "password": "password123",
  "username": "Mike",
  "email": "mike-email@email.com"
}
curl --request POST \
  --url 'https://login.xsolla.com/api/proxy/registration?projectId={projectId}&login_url=https%3A%2F%2Fexample.com' \
  --header 'content-type: application/json' \
  --data '{"username":"Mike","password":"password123","email":"mike-email@email.com"}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"username":"Mike","password":"password123","email":"mike-email@email.com"}');

$request->setRequestUrl('https://login.xsolla.com/api/proxy/registration');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setQuery(new http\QueryString(array(
  'projectId' => '{projectId}',
  'login_url' => 'https://example.com'
)));

$request->setHeaders(array(
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://login.xsolla.com/api/proxy/registration?projectId={projectId}&login_url=https%3A%2F%2Fexample.com");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"username\":\"Mike\",\"password\":\"password123\",\"email\":\"mike-email@email.com\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("login.xsolla.com")

payload = "{\"username\":\"Mike\",\"password\":\"password123\",\"email\":\"mike-email@email.com\"}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/api/proxy/registration?projectId={projectId}&login_url=https%3A%2F%2Fexample.com", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://login.xsolla.com/api/proxy/registration?projectId={projectId}&login_url=https%3A%2F%2Fexample.com")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"username\":\"Mike\",\"password\":\"password123\",\"email\":\"mike-email@email.com\"}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"username\":\"Mike\",\"password\":\"password123\",\"email\":\"mike-email@email.com\"}");
Request request = new Request.Builder()
  .url("https://login.xsolla.com/api/proxy/registration?projectId={projectId}&login_url=https%3A%2F%2Fexample.com")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "username": "Mike",
  "password": "password123",
  "email": "mike-email@email.com"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://login.xsolla.com/api/proxy/registration?projectId={projectId}&login_url=https%3A%2F%2Fexample.com");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);
レスポンス

ユーザー名とパスワードでプロキシ認証

指定したユーザー名とパスワードでユーザーを認証します。パブリッシャーアカウントのログイン設定で指定したユーザー確認URLに対するリクエストをプロキシします。

レスポンスtokenパラメータとremember_meパラメータを持つURLで、認証完了後にユーザーをリダイレクトします。

HTTPリクエスト

POST https://login.xsolla.com/api/proxy/login?projectId={projectId}&login_url={login_url}

パラメータ 種類 説明文
projectId
string パブリッシャーアカウントのログインID。 必須。
login_url
string 認証完了後に、追加パラメータを持つリンクを生成し、ユーザーをリダイレクトするURL。ログイン設定のパブリッシャーアカウントで指定したコールバックURLと同じURLにしてください。複数のコールバックURLがある場合は必須です。
username
string ユーザー名。 必須。
password
string パスワード。 必須。
remember_me
boolean ユーザーが認証データの保存に同意するかどうか。デフォルトは'false'。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
リクエスト
POST https://login.xsolla.com/api/proxy/login?login_url=https://example.com&projectId={projectId}

Headers:
  Content-Type: application/json

Body:
  {
  "username": "John",
  "password": "123456",
  "remember_me": true
}
curl --request POST \
  --url 'https://login.xsolla.com/api/proxy/login?projectId={projectId}&login_url=https%3A%2F%2Fexample.com' \
  --header 'content-type: application/json' \
  --data '{"username":"John","password":"123456","remember_me":true}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"username":"John","password":"123456","remember_me":true}');

$request->setRequestUrl('https://login.xsolla.com/api/proxy/login');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setQuery(new http\QueryString(array(
  'projectId' => '{projectId}',
  'login_url' => 'https://example.com'
)));

$request->setHeaders(array(
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://login.xsolla.com/api/proxy/login?projectId={projectId}&login_url=https%3A%2F%2Fexample.com");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"username\":\"John\",\"password\":\"123456\",\"remember_me\":true}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("login.xsolla.com")

payload = "{\"username\":\"John\",\"password\":\"123456\",\"remember_me\":true}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/api/proxy/login?projectId={projectId}&login_url=https%3A%2F%2Fexample.com", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://login.xsolla.com/api/proxy/login?projectId={projectId}&login_url=https%3A%2F%2Fexample.com")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"username\":\"John\",\"password\":\"123456\",\"remember_me\":true}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"username\":\"John\",\"password\":\"123456\",\"remember_me\":true}");
Request request = new Request.Builder()
  .url("https://login.xsolla.com/api/proxy/login?projectId={projectId}&login_url=https%3A%2F%2Fexample.com")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "username": "John",
  "password": "123456",
  "remember_me": true
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://login.xsolla.com/api/proxy/login?projectId={projectId}&login_url=https%3A%2F%2Fexample.com");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);
レスポンス
{
  "login_url": "https://example.com?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NDg0MjM5NDAsImlzcyI6Imh0dHBzOlwvXC9sb2dpbi54c29sbGEuY29tIiwiaWF0IjoxNTQ4MzM3NTQwLCJ1c2VybmFtZSI6InJvc2F5ZW4iLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6InBEdkdNa1VoWGFkX3lqYVZ3UElWNzZSdHpsMVUydXhCUnB5RUgtQmlmcTAiLCJzdWIiOiI4ZWUyYmU1ZS0xZDY5LTExZTktYWI1OS00MjAxMGFhODAwMjEiLCJ0eXBlIjoicHJveHkiLCJwcm92aWRlciI6Inhzb2xsYSIsInhzb2xsYV9sb2dpbl9wcm9qZWN0X2lkIjoiNTNkMjNhYzMtMWQ2Ni0xMWU5LTkyNDQtNDIwMTBhYTgwMDA0IiwiZW1haWwiOiJyb3NheWVuIiwicHVibGlzaGVyX2lkIjo3OTAxN30.NZxu3qDsLEuNV46TzIWw1eZS4Dznc7GPqGrVFeG1oCM&remember_me=true"
}
{
  "login_url": "https://example.com?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NDg0MjM5NDAsImlzcyI6Imh0dHBzOlwvXC9sb2dpbi54c29sbGEuY29tIiwiaWF0IjoxNTQ4MzM3NTQwLCJ1c2VybmFtZSI6InJvc2F5ZW4iLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6InBEdkdNa1VoWGFkX3lqYVZ3UElWNzZSdHpsMVUydXhCUnB5RUgtQmlmcTAiLCJzdWIiOiI4ZWUyYmU1ZS0xZDY5LTExZTktYWI1OS00MjAxMGFhODAwMjEiLCJ0eXBlIjoicHJveHkiLCJwcm92aWRlciI6Inhzb2xsYSIsInhzb2xsYV9sb2dpbl9wcm9qZWN0X2lkIjoiNTNkMjNhYzMtMWQ2Ni0xMWU5LTkyNDQtNDIwMTBhYTgwMDA0IiwiZW1haWwiOiJyb3NheWVuIiwicHVibGlzaGVyX2lkIjo3OTAxN30.NZxu3qDsLEuNV46TzIWw1eZS4Dznc7GPqGrVFeG1oCM&remember_me=true"
}
{
  "login_url": "https://example.com?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NDg0MjM5NDAsImlzcyI6Imh0dHBzOlwvXC9sb2dpbi54c29sbGEuY29tIiwiaWF0IjoxNTQ4MzM3NTQwLCJ1c2VybmFtZSI6InJvc2F5ZW4iLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6InBEdkdNa1VoWGFkX3lqYVZ3UElWNzZSdHpsMVUydXhCUnB5RUgtQmlmcTAiLCJzdWIiOiI4ZWUyYmU1ZS0xZDY5LTExZTktYWI1OS00MjAxMGFhODAwMjEiLCJ0eXBlIjoicHJveHkiLCJwcm92aWRlciI6Inhzb2xsYSIsInhzb2xsYV9sb2dpbl9wcm9qZWN0X2lkIjoiNTNkMjNhYzMtMWQ2Ni0xMWU5LTkyNDQtNDIwMTBhYTgwMDA0IiwiZW1haWwiOiJyb3NheWVuIiwicHVibGlzaGVyX2lkIjo3OTAxN30.NZxu3qDsLEuNV46TzIWw1eZS4Dznc7GPqGrVFeG1oCM&remember_me=true"
}
{
  "login_url": "https://example.com?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NDg0MjM5NDAsImlzcyI6Imh0dHBzOlwvXC9sb2dpbi54c29sbGEuY29tIiwiaWF0IjoxNTQ4MzM3NTQwLCJ1c2VybmFtZSI6InJvc2F5ZW4iLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6InBEdkdNa1VoWGFkX3lqYVZ3UElWNzZSdHpsMVUydXhCUnB5RUgtQmlmcTAiLCJzdWIiOiI4ZWUyYmU1ZS0xZDY5LTExZTktYWI1OS00MjAxMGFhODAwMjEiLCJ0eXBlIjoicHJveHkiLCJwcm92aWRlciI6Inhzb2xsYSIsInhzb2xsYV9sb2dpbl9wcm9qZWN0X2lkIjoiNTNkMjNhYzMtMWQ2Ni0xMWU5LTkyNDQtNDIwMTBhYTgwMDA0IiwiZW1haWwiOiJyb3NheWVuIiwicHVibGlzaGVyX2lkIjo3OTAxN30.NZxu3qDsLEuNV46TzIWw1eZS4Dznc7GPqGrVFeG1oCM&remember_me=true"
}
{
  "login_url": "https://example.com?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NDg0MjM5NDAsImlzcyI6Imh0dHBzOlwvXC9sb2dpbi54c29sbGEuY29tIiwiaWF0IjoxNTQ4MzM3NTQwLCJ1c2VybmFtZSI6InJvc2F5ZW4iLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6InBEdkdNa1VoWGFkX3lqYVZ3UElWNzZSdHpsMVUydXhCUnB5RUgtQmlmcTAiLCJzdWIiOiI4ZWUyYmU1ZS0xZDY5LTExZTktYWI1OS00MjAxMGFhODAwMjEiLCJ0eXBlIjoicHJveHkiLCJwcm92aWRlciI6Inhzb2xsYSIsInhzb2xsYV9sb2dpbl9wcm9qZWN0X2lkIjoiNTNkMjNhYzMtMWQ2Ni0xMWU5LTkyNDQtNDIwMTBhYTgwMDA0IiwiZW1haWwiOiJyb3NheWVuIiwicHVibGlzaGVyX2lkIjo3OTAxN30.NZxu3qDsLEuNV46TzIWw1eZS4Dznc7GPqGrVFeG1oCM&remember_me=true"
}
{
  "login_url": "https://example.com?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NDg0MjM5NDAsImlzcyI6Imh0dHBzOlwvXC9sb2dpbi54c29sbGEuY29tIiwiaWF0IjoxNTQ4MzM3NTQwLCJ1c2VybmFtZSI6InJvc2F5ZW4iLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6InBEdkdNa1VoWGFkX3lqYVZ3UElWNzZSdHpsMVUydXhCUnB5RUgtQmlmcTAiLCJzdWIiOiI4ZWUyYmU1ZS0xZDY5LTExZTktYWI1OS00MjAxMGFhODAwMjEiLCJ0eXBlIjoicHJveHkiLCJwcm92aWRlciI6Inhzb2xsYSIsInhzb2xsYV9sb2dpbl9wcm9qZWN0X2lkIjoiNTNkMjNhYzMtMWQ2Ni0xMWU5LTkyNDQtNDIwMTBhYTgwMDA0IiwiZW1haWwiOiJyb3NheWVuIiwicHVibGlzaGVyX2lkIjo3OTAxN30.NZxu3qDsLEuNV46TzIWw1eZS4Dznc7GPqGrVFeG1oCM&remember_me=true"
}
{
  "login_url": "https://example.com?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NDg0MjM5NDAsImlzcyI6Imh0dHBzOlwvXC9sb2dpbi54c29sbGEuY29tIiwiaWF0IjoxNTQ4MzM3NTQwLCJ1c2VybmFtZSI6InJvc2F5ZW4iLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6InBEdkdNa1VoWGFkX3lqYVZ3UElWNzZSdHpsMVUydXhCUnB5RUgtQmlmcTAiLCJzdWIiOiI4ZWUyYmU1ZS0xZDY5LTExZTktYWI1OS00MjAxMGFhODAwMjEiLCJ0eXBlIjoicHJveHkiLCJwcm92aWRlciI6Inhzb2xsYSIsInhzb2xsYV9sb2dpbl9wcm9qZWN0X2lkIjoiNTNkMjNhYzMtMWQ2Ni0xMWU5LTkyNDQtNDIwMTBhYTgwMDA0IiwiZW1haWwiOiJyb3NheWVuIiwicHVibGlzaGVyX2lkIjo3OTAxN30.NZxu3qDsLEuNV46TzIWw1eZS4Dznc7GPqGrVFeG1oCM&remember_me=true"
}
{
  "login_url": "https://example.com?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1NDg0MjM5NDAsImlzcyI6Imh0dHBzOlwvXC9sb2dpbi54c29sbGEuY29tIiwiaWF0IjoxNTQ4MzM3NTQwLCJ1c2VybmFtZSI6InJvc2F5ZW4iLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6InBEdkdNa1VoWGFkX3lqYVZ3UElWNzZSdHpsMVUydXhCUnB5RUgtQmlmcTAiLCJzdWIiOiI4ZWUyYmU1ZS0xZDY5LTExZTktYWI1OS00MjAxMGFhODAwMjEiLCJ0eXBlIjoicHJveHkiLCJwcm92aWRlciI6Inhzb2xsYSIsInhzb2xsYV9sb2dpbl9wcm9qZWN0X2lkIjoiNTNkMjNhYzMtMWQ2Ni0xMWU5LTkyNDQtNDIwMTBhYTgwMDA0IiwiZW1haWwiOiJyb3NheWVuIiwicHVibGlzaGVyX2lkIjo3OTAxN30.NZxu3qDsLEuNV46TzIWw1eZS4Dznc7GPqGrVFeG1oCM&remember_me=true"
}

ユーザーパスワードのリセットをプロキシ

ユーザーパスワードをリセットします。パブリッシャーアカウントのログイン設定で指定したパスワードリセットURLに対するリクエストをプロキシします。

HTTPリクエスト

POST https://login.xsolla.com/api/proxy/password/reset?projectId={projectId}&login_url={login_url}

パラメータ 種類 説明文
projectId
string パブリッシャーアカウントのログインID。 必須。
login_url
string パスワードリセット確認後に、追加パラメータを持つリンクを生成し、ユーザーをリダイレクトするURL。ログイン設定のパブリッシャーアカウントで指定したコールバックURLと同じURLにしてください。複数のコールバックURLがある場合は必須です。
email
string メールアドレス。 必須。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
リクエスト
POST https://login.xsolla.com/api/proxy/password/reset?login_url=https://example.com&projectId={projectId}

Headers:
  Content-Type: application/json

Body:
  {
  "email": "brooke-email@email.com"
}
curl --request POST \
  --url 'https://login.xsolla.com/api/proxy/password/reset?projectId={projectId}&login_url=https%3A%2F%2Fexample.com' \
  --header 'content-type: application/json' \
  --data '{"email":"brooke-email@email.com"}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"email":"brooke-email@email.com"}');

$request->setRequestUrl('https://login.xsolla.com/api/proxy/password/reset');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setQuery(new http\QueryString(array(
  'projectId' => '{projectId}',
  'login_url' => 'https://example.com'
)));

$request->setHeaders(array(
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://login.xsolla.com/api/proxy/password/reset?projectId={projectId}&login_url=https%3A%2F%2Fexample.com");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"email\":\"brooke-email@email.com\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("login.xsolla.com")

payload = "{\"email\":\"brooke-email@email.com\"}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/api/proxy/password/reset?projectId={projectId}&login_url=https%3A%2F%2Fexample.com", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://login.xsolla.com/api/proxy/password/reset?projectId={projectId}&login_url=https%3A%2F%2Fexample.com")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"email\":\"brooke-email@email.com\"}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"email\":\"brooke-email@email.com\"}");
Request request = new Request.Builder()
  .url("https://login.xsolla.com/api/proxy/password/reset?projectId={projectId}&login_url=https%3A%2F%2Fexample.com")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "email": "brooke-email@email.com"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://login.xsolla.com/api/proxy/password/reset?projectId={projectId}&login_url=https%3A%2F%2Fexample.com");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);
レスポンス

ソーシャル認証

パブリッシャーアカウントのログインに接続した全てのSNS経由で、認証用リンクを取得します。

レスポンス:ログインUIのSNSボタンに使用するURL。

HTTPリクエスト

GET https://login.xsolla.com/api/social/login_urls?projectId={projectId}&fields={fields}&login_url={login_url}

パラメータ 種類 説明文
string パブリッシャーアカウントのログインID。 必須。
array of strings 問題なくユーザーの登録や認証を実行するために、必要なパラメータのリスト。例:'email, promo_email_agreement'。ユーザーは対応するフォームで、該当するパラメータの指定を求められます。
string SNS認証用リンクを生成するURL。ログイン設定のパブリッシャーアカウントで指定したコールバックURLと同じURLにしてください。複数のコールバックURLがある場合は必須です。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
リクエスト
GET https://login.xsolla.com/api/social/login_urls?fields=email&login_url=https://example.com&projectId={projectId}
curl --request GET \
  --url 'https://login.xsolla.com/api/social/login_urls?projectId={projectId}&fields=email&login_url=https%3A%2F%2Fexample.com'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://login.xsolla.com/api/social/login_urls');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString(array(
  'projectId' => '{projectId}',
  'fields' => 'email',
  'login_url' => 'https://example.com'
)));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://login.xsolla.com/api/social/login_urls?projectId={projectId}&fields=email&login_url=https%3A%2F%2Fexample.com");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("login.xsolla.com")

conn.request("GET", "/api/social/login_urls?projectId={projectId}&fields=email&login_url=https%3A%2F%2Fexample.com")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://login.xsolla.com/api/social/login_urls?projectId={projectId}&fields=email&login_url=https%3A%2F%2Fexample.com")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://login.xsolla.com/api/social/login_urls?projectId={projectId}&fields=email&login_url=https%3A%2F%2Fexample.com")
  .get()
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://login.xsolla.com/api/social/login_urls?projectId={projectId}&fields=email&login_url=https%3A%2F%2Fexample.com");

xhr.send(data);
レスポンス
{
  "amazon": "https://example.com/api/social/amazon/login_redirect?projectId={projectId}&fields=email",
  "baidu": "https://example.com/api/social/baidu/login_redirect?projectId={projectId}&fields=email",
  "battlenet": "https://example.com/api/social/battlenet/login_redirect?projectId={projectId}&fields=email",
  "china_telecom": "https://example.com/api/social/china_telecom/login_redirect?projectId={projectId}&fields=email",
  "discord": "https://example.com/api/social/discord/login_redirect?projectId={projectId}&fields=email",
  "facebook": "https://example.com/api/social/facebook/login_redirect?projectId={projectId}&fields=email",
  "github": "https://example.com/api/social/github/login_redirect?projectId={projectId}&fields=email",
  "google": "https://example.com/api/social/google/login_redirect?projectId={projectId}&fields=email",
  "google+": "https://example.com/api/social/google+/login_redirect?projectId={projectId}&fields=email",
  "instagram": "https://example.com/api/social/instagram/login_redirect?projectId={projectId}&fields=email",
  "kakao": "https://example.com/api/social/kakao/login_redirect?projectId={projectId}&fields=email",
  "linkedin": "https://example.com/api/social/linkedin/login_redirect?projectId={projectId}&fields=email",
  "mailru": "https://example.com/api/social/mailru/login_redirect?projectId={projectId}&fields=email",
  "microsoft": "https://example.com/api/social/microsoft/login_redirect?projectId={projectId}&fields=email",
  "msn": "https://example.com/api/social/msn/login_redirect?projectId={projectId}&fields=email",
  "naver": "https://example.com/api/social/naver/login_redirect?projectId={projectId}&fields=email",
  "ok": "https://example.com/api/social/ok/login_redirect?projectId={projectId}&fields=email",
  "paypal": "https://example.com/api/social/paypal/login_redirect?projectId={projectId}&fields=email",
  "pinterest": "https://example.com/api/social/pinterest/login_redirect?projectId={projectId}&fields=email",
  "qq": "https://example.com/api/social/qq/login_redirect?projectId={projectId}&fields=email",
  "reddit": "https://example.com/api/social/reddit/login_redirect?projectId={projectId}&fields=email",
  "steam": "https://example.com/api/social/steam/login_redirect?projectId={projectId}&fields=email",
  "twitch": "https://example.com/api/social/twitch/login_redirect?projectId={projectId}&fields=email",
  "twitter": "https://example.com/api/social/twitter/login_redirect?projectId={projectId}&fields=email",
  "vimeo": "https://example.com/api/social/vimeo/login_redirect?projectId={projectId}&fields=email",
  "vk": "https://example.com/api/social/vk/login_redirect?projectId={projectId}&fields=email",
  "wechat": "https://example.com/api/social/wechat/login_redirect?projectId={projectId}&fields=email",
  "weibo": "https://example.com/api/social/weibo/login_redirect?projectId={projectId}&fields=email",
  "yahoo": "https://example.com/api/social/yahoo/login_redirect?projectId={projectId}&fields=email",
  "yandex": "https://example.com/api/social/yandex/login_redirect?projectId={projectId}&fields=email",
  "youtube": "https://example.com/api/social/youtube/login_redirect?projectId={projectId}&fields=email"
}
{
  "amazon": "https://example.com/api/social/amazon/login_redirect?projectId={projectId}&fields=email",
  "baidu": "https://example.com/api/social/baidu/login_redirect?projectId={projectId}&fields=email",
  "battlenet": "https://example.com/api/social/battlenet/login_redirect?projectId={projectId}&fields=email",
  "china_telecom": "https://example.com/api/social/china_telecom/login_redirect?projectId={projectId}&fields=email",
  "discord": "https://example.com/api/social/discord/login_redirect?projectId={projectId}&fields=email",
  "facebook": "https://example.com/api/social/facebook/login_redirect?projectId={projectId}&fields=email",
  "github": "https://example.com/api/social/github/login_redirect?projectId={projectId}&fields=email",
  "google": "https://example.com/api/social/google/login_redirect?projectId={projectId}&fields=email",
  "google+": "https://example.com/api/social/google+/login_redirect?projectId={projectId}&fields=email",
  "instagram": "https://example.com/api/social/instagram/login_redirect?projectId={projectId}&fields=email",
  "kakao": "https://example.com/api/social/kakao/login_redirect?projectId={projectId}&fields=email",
  "linkedin": "https://example.com/api/social/linkedin/login_redirect?projectId={projectId}&fields=email",
  "mailru": "https://example.com/api/social/mailru/login_redirect?projectId={projectId}&fields=email",
  "microsoft": "https://example.com/api/social/microsoft/login_redirect?projectId={projectId}&fields=email",
  "msn": "https://example.com/api/social/msn/login_redirect?projectId={projectId}&fields=email",
  "naver": "https://example.com/api/social/naver/login_redirect?projectId={projectId}&fields=email",
  "ok": "https://example.com/api/social/ok/login_redirect?projectId={projectId}&fields=email",
  "paypal": "https://example.com/api/social/paypal/login_redirect?projectId={projectId}&fields=email",
  "pinterest": "https://example.com/api/social/pinterest/login_redirect?projectId={projectId}&fields=email",
  "qq": "https://example.com/api/social/qq/login_redirect?projectId={projectId}&fields=email",
  "reddit": "https://example.com/api/social/reddit/login_redirect?projectId={projectId}&fields=email",
  "steam": "https://example.com/api/social/steam/login_redirect?projectId={projectId}&fields=email",
  "twitch": "https://example.com/api/social/twitch/login_redirect?projectId={projectId}&fields=email",
  "twitter": "https://example.com/api/social/twitter/login_redirect?projectId={projectId}&fields=email",
  "vimeo": "https://example.com/api/social/vimeo/login_redirect?projectId={projectId}&fields=email",
  "vk": "https://example.com/api/social/vk/login_redirect?projectId={projectId}&fields=email",
  "wechat": "https://example.com/api/social/wechat/login_redirect?projectId={projectId}&fields=email",
  "weibo": "https://example.com/api/social/weibo/login_redirect?projectId={projectId}&fields=email",
  "yahoo": "https://example.com/api/social/yahoo/login_redirect?projectId={projectId}&fields=email",
  "yandex": "https://example.com/api/social/yandex/login_redirect?projectId={projectId}&fields=email",
  "youtube": "https://example.com/api/social/youtube/login_redirect?projectId={projectId}&fields=email"
}
{
  "amazon": "https://example.com/api/social/amazon/login_redirect?projectId={projectId}&fields=email",
  "baidu": "https://example.com/api/social/baidu/login_redirect?projectId={projectId}&fields=email",
  "battlenet": "https://example.com/api/social/battlenet/login_redirect?projectId={projectId}&fields=email",
  "china_telecom": "https://example.com/api/social/china_telecom/login_redirect?projectId={projectId}&fields=email",
  "discord": "https://example.com/api/social/discord/login_redirect?projectId={projectId}&fields=email",
  "facebook": "https://example.com/api/social/facebook/login_redirect?projectId={projectId}&fields=email",
  "github": "https://example.com/api/social/github/login_redirect?projectId={projectId}&fields=email",
  "google": "https://example.com/api/social/google/login_redirect?projectId={projectId}&fields=email",
  "google+": "https://example.com/api/social/google+/login_redirect?projectId={projectId}&fields=email",
  "instagram": "https://example.com/api/social/instagram/login_redirect?projectId={projectId}&fields=email",
  "kakao": "https://example.com/api/social/kakao/login_redirect?projectId={projectId}&fields=email",
  "linkedin": "https://example.com/api/social/linkedin/login_redirect?projectId={projectId}&fields=email",
  "mailru": "https://example.com/api/social/mailru/login_redirect?projectId={projectId}&fields=email",
  "microsoft": "https://example.com/api/social/microsoft/login_redirect?projectId={projectId}&fields=email",
  "msn": "https://example.com/api/social/msn/login_redirect?projectId={projectId}&fields=email",
  "naver": "https://example.com/api/social/naver/login_redirect?projectId={projectId}&fields=email",
  "ok": "https://example.com/api/social/ok/login_redirect?projectId={projectId}&fields=email",
  "paypal": "https://example.com/api/social/paypal/login_redirect?projectId={projectId}&fields=email",
  "pinterest": "https://example.com/api/social/pinterest/login_redirect?projectId={projectId}&fields=email",
  "qq": "https://example.com/api/social/qq/login_redirect?projectId={projectId}&fields=email",
  "reddit": "https://example.com/api/social/reddit/login_redirect?projectId={projectId}&fields=email",
  "steam": "https://example.com/api/social/steam/login_redirect?projectId={projectId}&fields=email",
  "twitch": "https://example.com/api/social/twitch/login_redirect?projectId={projectId}&fields=email",
  "twitter": "https://example.com/api/social/twitter/login_redirect?projectId={projectId}&fields=email",
  "vimeo": "https://example.com/api/social/vimeo/login_redirect?projectId={projectId}&fields=email",
  "vk": "https://example.com/api/social/vk/login_redirect?projectId={projectId}&fields=email",
  "wechat": "https://example.com/api/social/wechat/login_redirect?projectId={projectId}&fields=email",
  "weibo": "https://example.com/api/social/weibo/login_redirect?projectId={projectId}&fields=email",
  "yahoo": "https://example.com/api/social/yahoo/login_redirect?projectId={projectId}&fields=email",
  "yandex": "https://example.com/api/social/yandex/login_redirect?projectId={projectId}&fields=email",
  "youtube": "https://example.com/api/social/youtube/login_redirect?projectId={projectId}&fields=email"
}
{
  "amazon": "https://example.com/api/social/amazon/login_redirect?projectId={projectId}&fields=email",
  "baidu": "https://example.com/api/social/baidu/login_redirect?projectId={projectId}&fields=email",
  "battlenet": "https://example.com/api/social/battlenet/login_redirect?projectId={projectId}&fields=email",
  "china_telecom": "https://example.com/api/social/china_telecom/login_redirect?projectId={projectId}&fields=email",
  "discord": "https://example.com/api/social/discord/login_redirect?projectId={projectId}&fields=email",
  "facebook": "https://example.com/api/social/facebook/login_redirect?projectId={projectId}&fields=email",
  "github": "https://example.com/api/social/github/login_redirect?projectId={projectId}&fields=email",
  "google": "https://example.com/api/social/google/login_redirect?projectId={projectId}&fields=email",
  "google+": "https://example.com/api/social/google+/login_redirect?projectId={projectId}&fields=email",
  "instagram": "https://example.com/api/social/instagram/login_redirect?projectId={projectId}&fields=email",
  "kakao": "https://example.com/api/social/kakao/login_redirect?projectId={projectId}&fields=email",
  "linkedin": "https://example.com/api/social/linkedin/login_redirect?projectId={projectId}&fields=email",
  "mailru": "https://example.com/api/social/mailru/login_redirect?projectId={projectId}&fields=email",
  "microsoft": "https://example.com/api/social/microsoft/login_redirect?projectId={projectId}&fields=email",
  "msn": "https://example.com/api/social/msn/login_redirect?projectId={projectId}&fields=email",
  "naver": "https://example.com/api/social/naver/login_redirect?projectId={projectId}&fields=email",
  "ok": "https://example.com/api/social/ok/login_redirect?projectId={projectId}&fields=email",
  "paypal": "https://example.com/api/social/paypal/login_redirect?projectId={projectId}&fields=email",
  "pinterest": "https://example.com/api/social/pinterest/login_redirect?projectId={projectId}&fields=email",
  "qq": "https://example.com/api/social/qq/login_redirect?projectId={projectId}&fields=email",
  "reddit": "https://example.com/api/social/reddit/login_redirect?projectId={projectId}&fields=email",
  "steam": "https://example.com/api/social/steam/login_redirect?projectId={projectId}&fields=email",
  "twitch": "https://example.com/api/social/twitch/login_redirect?projectId={projectId}&fields=email",
  "twitter": "https://example.com/api/social/twitter/login_redirect?projectId={projectId}&fields=email",
  "vimeo": "https://example.com/api/social/vimeo/login_redirect?projectId={projectId}&fields=email",
  "vk": "https://example.com/api/social/vk/login_redirect?projectId={projectId}&fields=email",
  "wechat": "https://example.com/api/social/wechat/login_redirect?projectId={projectId}&fields=email",
  "weibo": "https://example.com/api/social/weibo/login_redirect?projectId={projectId}&fields=email",
  "yahoo": "https://example.com/api/social/yahoo/login_redirect?projectId={projectId}&fields=email",
  "yandex": "https://example.com/api/social/yandex/login_redirect?projectId={projectId}&fields=email",
  "youtube": "https://example.com/api/social/youtube/login_redirect?projectId={projectId}&fields=email"
}
{
  "amazon": "https://example.com/api/social/amazon/login_redirect?projectId={projectId}&fields=email",
  "baidu": "https://example.com/api/social/baidu/login_redirect?projectId={projectId}&fields=email",
  "battlenet": "https://example.com/api/social/battlenet/login_redirect?projectId={projectId}&fields=email",
  "china_telecom": "https://example.com/api/social/china_telecom/login_redirect?projectId={projectId}&fields=email",
  "discord": "https://example.com/api/social/discord/login_redirect?projectId={projectId}&fields=email",
  "facebook": "https://example.com/api/social/facebook/login_redirect?projectId={projectId}&fields=email",
  "github": "https://example.com/api/social/github/login_redirect?projectId={projectId}&fields=email",
  "google": "https://example.com/api/social/google/login_redirect?projectId={projectId}&fields=email",
  "google+": "https://example.com/api/social/google+/login_redirect?projectId={projectId}&fields=email",
  "instagram": "https://example.com/api/social/instagram/login_redirect?projectId={projectId}&fields=email",
  "kakao": "https://example.com/api/social/kakao/login_redirect?projectId={projectId}&fields=email",
  "linkedin": "https://example.com/api/social/linkedin/login_redirect?projectId={projectId}&fields=email",
  "mailru": "https://example.com/api/social/mailru/login_redirect?projectId={projectId}&fields=email",
  "microsoft": "https://example.com/api/social/microsoft/login_redirect?projectId={projectId}&fields=email",
  "msn": "https://example.com/api/social/msn/login_redirect?projectId={projectId}&fields=email",
  "naver": "https://example.com/api/social/naver/login_redirect?projectId={projectId}&fields=email",
  "ok": "https://example.com/api/social/ok/login_redirect?projectId={projectId}&fields=email",
  "paypal": "https://example.com/api/social/paypal/login_redirect?projectId={projectId}&fields=email",
  "pinterest": "https://example.com/api/social/pinterest/login_redirect?projectId={projectId}&fields=email",
  "qq": "https://example.com/api/social/qq/login_redirect?projectId={projectId}&fields=email",
  "reddit": "https://example.com/api/social/reddit/login_redirect?projectId={projectId}&fields=email",
  "steam": "https://example.com/api/social/steam/login_redirect?projectId={projectId}&fields=email",
  "twitch": "https://example.com/api/social/twitch/login_redirect?projectId={projectId}&fields=email",
  "twitter": "https://example.com/api/social/twitter/login_redirect?projectId={projectId}&fields=email",
  "vimeo": "https://example.com/api/social/vimeo/login_redirect?projectId={projectId}&fields=email",
  "vk": "https://example.com/api/social/vk/login_redirect?projectId={projectId}&fields=email",
  "wechat": "https://example.com/api/social/wechat/login_redirect?projectId={projectId}&fields=email",
  "weibo": "https://example.com/api/social/weibo/login_redirect?projectId={projectId}&fields=email",
  "yahoo": "https://example.com/api/social/yahoo/login_redirect?projectId={projectId}&fields=email",
  "yandex": "https://example.com/api/social/yandex/login_redirect?projectId={projectId}&fields=email",
  "youtube": "https://example.com/api/social/youtube/login_redirect?projectId={projectId}&fields=email"
}
{
  "amazon": "https://example.com/api/social/amazon/login_redirect?projectId={projectId}&fields=email",
  "baidu": "https://example.com/api/social/baidu/login_redirect?projectId={projectId}&fields=email",
  "battlenet": "https://example.com/api/social/battlenet/login_redirect?projectId={projectId}&fields=email",
  "china_telecom": "https://example.com/api/social/china_telecom/login_redirect?projectId={projectId}&fields=email",
  "discord": "https://example.com/api/social/discord/login_redirect?projectId={projectId}&fields=email",
  "facebook": "https://example.com/api/social/facebook/login_redirect?projectId={projectId}&fields=email",
  "github": "https://example.com/api/social/github/login_redirect?projectId={projectId}&fields=email",
  "google": "https://example.com/api/social/google/login_redirect?projectId={projectId}&fields=email",
  "google+": "https://example.com/api/social/google+/login_redirect?projectId={projectId}&fields=email",
  "instagram": "https://example.com/api/social/instagram/login_redirect?projectId={projectId}&fields=email",
  "kakao": "https://example.com/api/social/kakao/login_redirect?projectId={projectId}&fields=email",
  "linkedin": "https://example.com/api/social/linkedin/login_redirect?projectId={projectId}&fields=email",
  "mailru": "https://example.com/api/social/mailru/login_redirect?projectId={projectId}&fields=email",
  "microsoft": "https://example.com/api/social/microsoft/login_redirect?projectId={projectId}&fields=email",
  "msn": "https://example.com/api/social/msn/login_redirect?projectId={projectId}&fields=email",
  "naver": "https://example.com/api/social/naver/login_redirect?projectId={projectId}&fields=email",
  "ok": "https://example.com/api/social/ok/login_redirect?projectId={projectId}&fields=email",
  "paypal": "https://example.com/api/social/paypal/login_redirect?projectId={projectId}&fields=email",
  "pinterest": "https://example.com/api/social/pinterest/login_redirect?projectId={projectId}&fields=email",
  "qq": "https://example.com/api/social/qq/login_redirect?projectId={projectId}&fields=email",
  "reddit": "https://example.com/api/social/reddit/login_redirect?projectId={projectId}&fields=email",
  "steam": "https://example.com/api/social/steam/login_redirect?projectId={projectId}&fields=email",
  "twitch": "https://example.com/api/social/twitch/login_redirect?projectId={projectId}&fields=email",
  "twitter": "https://example.com/api/social/twitter/login_redirect?projectId={projectId}&fields=email",
  "vimeo": "https://example.com/api/social/vimeo/login_redirect?projectId={projectId}&fields=email",
  "vk": "https://example.com/api/social/vk/login_redirect?projectId={projectId}&fields=email",
  "wechat": "https://example.com/api/social/wechat/login_redirect?projectId={projectId}&fields=email",
  "weibo": "https://example.com/api/social/weibo/login_redirect?projectId={projectId}&fields=email",
  "yahoo": "https://example.com/api/social/yahoo/login_redirect?projectId={projectId}&fields=email",
  "yandex": "https://example.com/api/social/yandex/login_redirect?projectId={projectId}&fields=email",
  "youtube": "https://example.com/api/social/youtube/login_redirect?projectId={projectId}&fields=email"
}
{
  "amazon": "https://example.com/api/social/amazon/login_redirect?projectId={projectId}&fields=email",
  "baidu": "https://example.com/api/social/baidu/login_redirect?projectId={projectId}&fields=email",
  "battlenet": "https://example.com/api/social/battlenet/login_redirect?projectId={projectId}&fields=email",
  "china_telecom": "https://example.com/api/social/china_telecom/login_redirect?projectId={projectId}&fields=email",
  "discord": "https://example.com/api/social/discord/login_redirect?projectId={projectId}&fields=email",
  "facebook": "https://example.com/api/social/facebook/login_redirect?projectId={projectId}&fields=email",
  "github": "https://example.com/api/social/github/login_redirect?projectId={projectId}&fields=email",
  "google": "https://example.com/api/social/google/login_redirect?projectId={projectId}&fields=email",
  "google+": "https://example.com/api/social/google+/login_redirect?projectId={projectId}&fields=email",
  "instagram": "https://example.com/api/social/instagram/login_redirect?projectId={projectId}&fields=email",
  "kakao": "https://example.com/api/social/kakao/login_redirect?projectId={projectId}&fields=email",
  "linkedin": "https://example.com/api/social/linkedin/login_redirect?projectId={projectId}&fields=email",
  "mailru": "https://example.com/api/social/mailru/login_redirect?projectId={projectId}&fields=email",
  "microsoft": "https://example.com/api/social/microsoft/login_redirect?projectId={projectId}&fields=email",
  "msn": "https://example.com/api/social/msn/login_redirect?projectId={projectId}&fields=email",
  "naver": "https://example.com/api/social/naver/login_redirect?projectId={projectId}&fields=email",
  "ok": "https://example.com/api/social/ok/login_redirect?projectId={projectId}&fields=email",
  "paypal": "https://example.com/api/social/paypal/login_redirect?projectId={projectId}&fields=email",
  "pinterest": "https://example.com/api/social/pinterest/login_redirect?projectId={projectId}&fields=email",
  "qq": "https://example.com/api/social/qq/login_redirect?projectId={projectId}&fields=email",
  "reddit": "https://example.com/api/social/reddit/login_redirect?projectId={projectId}&fields=email",
  "steam": "https://example.com/api/social/steam/login_redirect?projectId={projectId}&fields=email",
  "twitch": "https://example.com/api/social/twitch/login_redirect?projectId={projectId}&fields=email",
  "twitter": "https://example.com/api/social/twitter/login_redirect?projectId={projectId}&fields=email",
  "vimeo": "https://example.com/api/social/vimeo/login_redirect?projectId={projectId}&fields=email",
  "vk": "https://example.com/api/social/vk/login_redirect?projectId={projectId}&fields=email",
  "wechat": "https://example.com/api/social/wechat/login_redirect?projectId={projectId}&fields=email",
  "weibo": "https://example.com/api/social/weibo/login_redirect?projectId={projectId}&fields=email",
  "yahoo": "https://example.com/api/social/yahoo/login_redirect?projectId={projectId}&fields=email",
  "yandex": "https://example.com/api/social/yandex/login_redirect?projectId={projectId}&fields=email",
  "youtube": "https://example.com/api/social/youtube/login_redirect?projectId={projectId}&fields=email"
}
{
  "amazon": "https://example.com/api/social/amazon/login_redirect?projectId={projectId}&fields=email",
  "baidu": "https://example.com/api/social/baidu/login_redirect?projectId={projectId}&fields=email",
  "battlenet": "https://example.com/api/social/battlenet/login_redirect?projectId={projectId}&fields=email",
  "china_telecom": "https://example.com/api/social/china_telecom/login_redirect?projectId={projectId}&fields=email",
  "discord": "https://example.com/api/social/discord/login_redirect?projectId={projectId}&fields=email",
  "facebook": "https://example.com/api/social/facebook/login_redirect?projectId={projectId}&fields=email",
  "github": "https://example.com/api/social/github/login_redirect?projectId={projectId}&fields=email",
  "google": "https://example.com/api/social/google/login_redirect?projectId={projectId}&fields=email",
  "google+": "https://example.com/api/social/google+/login_redirect?projectId={projectId}&fields=email",
  "instagram": "https://example.com/api/social/instagram/login_redirect?projectId={projectId}&fields=email",
  "kakao": "https://example.com/api/social/kakao/login_redirect?projectId={projectId}&fields=email",
  "linkedin": "https://example.com/api/social/linkedin/login_redirect?projectId={projectId}&fields=email",
  "mailru": "https://example.com/api/social/mailru/login_redirect?projectId={projectId}&fields=email",
  "microsoft": "https://example.com/api/social/microsoft/login_redirect?projectId={projectId}&fields=email",
  "msn": "https://example.com/api/social/msn/login_redirect?projectId={projectId}&fields=email",
  "naver": "https://example.com/api/social/naver/login_redirect?projectId={projectId}&fields=email",
  "ok": "https://example.com/api/social/ok/login_redirect?projectId={projectId}&fields=email",
  "paypal": "https://example.com/api/social/paypal/login_redirect?projectId={projectId}&fields=email",
  "pinterest": "https://example.com/api/social/pinterest/login_redirect?projectId={projectId}&fields=email",
  "qq": "https://example.com/api/social/qq/login_redirect?projectId={projectId}&fields=email",
  "reddit": "https://example.com/api/social/reddit/login_redirect?projectId={projectId}&fields=email",
  "steam": "https://example.com/api/social/steam/login_redirect?projectId={projectId}&fields=email",
  "twitch": "https://example.com/api/social/twitch/login_redirect?projectId={projectId}&fields=email",
  "twitter": "https://example.com/api/social/twitter/login_redirect?projectId={projectId}&fields=email",
  "vimeo": "https://example.com/api/social/vimeo/login_redirect?projectId={projectId}&fields=email",
  "vk": "https://example.com/api/social/vk/login_redirect?projectId={projectId}&fields=email",
  "wechat": "https://example.com/api/social/wechat/login_redirect?projectId={projectId}&fields=email",
  "weibo": "https://example.com/api/social/weibo/login_redirect?projectId={projectId}&fields=email",
  "yahoo": "https://example.com/api/social/yahoo/login_redirect?projectId={projectId}&fields=email",
  "yandex": "https://example.com/api/social/yandex/login_redirect?projectId={projectId}&fields=email",
  "youtube": "https://example.com/api/social/youtube/login_redirect?projectId={projectId}&fields=email"
}

SNS経由で認証

パブリッシャーアカウントのログインに接続したSNS経由で、ユーザーを認証します。

HTTPリクエスト

GET https://login.xsolla.com/api/social/{providerName}/login_redirect?projectId={projectId}&fields={fields}&login_url={login_url}

パラメータ 種類 説明文
providerName
string パブリッシャーアカウントのログインに接続しているSNSの名前。該当するもの:'amazon', 'baidu', 'battlenet', 'china_telecom', 'discord', 'facebook', 'github', 'google', 'google+', 'instagram', 'kakao', 'linkedin', 'mailru.oauth', 'microsoft', 'msn', 'naver', 'ok', 'paradox', 'paypal', 'pinterest', 'qq', 'reddit', 'steam', 'twitch', 'twitter', 'vimeo', 'vk', 'wechat', 'weibo', 'yahoo', 'yandex', 'youtube'。 必須。
projectId
string パブリッシャーアカウントのログインID。 必須。
fields
array of strings 問題なくユーザーの登録や認証を実行するために、必要なパラメータのリスト。例:'email, promo_email_agreement'。ユーザーは対応するフォームで、該当するパラメータの指定を求められます。
login_url
string SNS認証用リンクを生成するURL。ログイン設定のパブリッシャーアカウントで指定したコールバックURLと同じURLにしてください。複数のコールバックURLがある場合は必須です。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
リクエスト
GET https://login.xsolla.com/api/social/amazon/login_redirect?fields=email&login_url=https://example.com&projectId={projectId}
curl --request GET \
  --url 'https://login.xsolla.com/api/social/amazon/login_redirect?projectId={projectId}&fields=email&login_url=https%3A%2F%2Fexample.com'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://login.xsolla.com/api/social/amazon/login_redirect');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString(array(
  'projectId' => '{projectId}',
  'fields' => 'email',
  'login_url' => 'https://example.com'
)));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://login.xsolla.com/api/social/amazon/login_redirect?projectId={projectId}&fields=email&login_url=https%3A%2F%2Fexample.com");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("login.xsolla.com")

conn.request("GET", "/api/social/amazon/login_redirect?projectId={projectId}&fields=email&login_url=https%3A%2F%2Fexample.com")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://login.xsolla.com/api/social/amazon/login_redirect?projectId={projectId}&fields=email&login_url=https%3A%2F%2Fexample.com")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://login.xsolla.com/api/social/amazon/login_redirect?projectId={projectId}&fields=email&login_url=https%3A%2F%2Fexample.com")
  .get()
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://login.xsolla.com/api/social/amazon/login_redirect?projectId={projectId}&fields=email&login_url=https%3A%2F%2Fexample.com");

xhr.send(data);
レスポンス