接続済みアカウントリクエストを作成
curl --request POST \
--url https://{host}/me/v1/connected-accounts/connect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection": "<string>",
"redirect_uri": "<string>",
"authorization_params": {
"acr_values": "<string>",
"audience": "<string>",
"id_token_hint": "<string>",
"login_hint": "<string>",
"max_age": 1073741823,
"resource": "<string>",
"ui_locales": "<string>"
},
"code_challenge": "<string>",
"code_challenge_method": "<string>",
"scopes": [
"openid",
"offline_access",
"read:tasks",
"write:tasks"
],
"state": "<string>"
}
'import requests
url = "https://{host}/me/v1/connected-accounts/connect"
payload = {
"connection": "<string>",
"redirect_uri": "<string>",
"authorization_params": {
"acr_values": "<string>",
"audience": "<string>",
"id_token_hint": "<string>",
"login_hint": "<string>",
"max_age": 1073741823,
"resource": "<string>",
"ui_locales": "<string>"
},
"code_challenge": "<string>",
"code_challenge_method": "<string>",
"scopes": ["openid", "offline_access", "read:tasks", "write:tasks"],
"state": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connection: '<string>',
redirect_uri: '<string>',
authorization_params: {
acr_values: '<string>',
audience: '<string>',
id_token_hint: '<string>',
login_hint: '<string>',
max_age: 1073741823,
resource: '<string>',
ui_locales: '<string>'
},
code_challenge: '<string>',
code_challenge_method: '<string>',
scopes: ['openid', 'offline_access', 'read:tasks', 'write:tasks'],
state: '<string>'
})
};
fetch('https://{host}/me/v1/connected-accounts/connect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/me/v1/connected-accounts/connect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'connection' => '<string>',
'redirect_uri' => '<string>',
'authorization_params' => [
'acr_values' => '<string>',
'audience' => '<string>',
'id_token_hint' => '<string>',
'login_hint' => '<string>',
'max_age' => 1073741823,
'resource' => '<string>',
'ui_locales' => '<string>'
],
'code_challenge' => '<string>',
'code_challenge_method' => '<string>',
'scopes' => [
'openid',
'offline_access',
'read:tasks',
'write:tasks'
],
'state' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/me/v1/connected-accounts/connect"
payload := strings.NewReader("{\n \"connection\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"authorization_params\": {\n \"acr_values\": \"<string>\",\n \"audience\": \"<string>\",\n \"id_token_hint\": \"<string>\",\n \"login_hint\": \"<string>\",\n \"max_age\": 1073741823,\n \"resource\": \"<string>\",\n \"ui_locales\": \"<string>\"\n },\n \"code_challenge\": \"<string>\",\n \"code_challenge_method\": \"<string>\",\n \"scopes\": [\n \"openid\",\n \"offline_access\",\n \"read:tasks\",\n \"write:tasks\"\n ],\n \"state\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/me/v1/connected-accounts/connect")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connection\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"authorization_params\": {\n \"acr_values\": \"<string>\",\n \"audience\": \"<string>\",\n \"id_token_hint\": \"<string>\",\n \"login_hint\": \"<string>\",\n \"max_age\": 1073741823,\n \"resource\": \"<string>\",\n \"ui_locales\": \"<string>\"\n },\n \"code_challenge\": \"<string>\",\n \"code_challenge_method\": \"<string>\",\n \"scopes\": [\n \"openid\",\n \"offline_access\",\n \"read:tasks\",\n \"write:tasks\"\n ],\n \"state\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/me/v1/connected-accounts/connect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connection\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"authorization_params\": {\n \"acr_values\": \"<string>\",\n \"audience\": \"<string>\",\n \"id_token_hint\": \"<string>\",\n \"login_hint\": \"<string>\",\n \"max_age\": 1073741823,\n \"resource\": \"<string>\",\n \"ui_locales\": \"<string>\"\n },\n \"code_challenge\": \"<string>\",\n \"code_challenge_method\": \"<string>\",\n \"scopes\": [\n \"openid\",\n \"offline_access\",\n \"read:tasks\",\n \"write:tasks\"\n ],\n \"state\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"auth_session": "<string>",
"connect_params": {
"ticket": "<string>"
},
"connect_uri": "<string>",
"expires_in": 2
}{
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"validation_errors": [
{
"detail": "<string>",
"field": "<string>",
"pointer": "<string>",
"source": "<string>"
}
]
}{
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"validation_errors": [
{
"detail": "<string>",
"field": "<string>",
"pointer": "<string>",
"source": "<string>"
}
]
}{
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"validation_errors": [
{
"detail": "<string>",
"field": "<string>",
"pointer": "<string>",
"source": "<string>"
}
]
}{
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"validation_errors": [
{
"detail": "<string>",
"field": "<string>",
"pointer": "<string>",
"source": "<string>"
}
]
}{
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"validation_errors": [
{
"detail": "<string>",
"field": "<string>",
"pointer": "<string>",
"source": "<string>"
}
]
}接続済みアカウントの作成リクエスト
認証されたユーザーのアカウントを外部IDプロバイダーにリンクするための認可フローを開始します。
POST
https://{host}/me/v1
/
connected-accounts
/
connect
接続済みアカウントリクエストを作成
curl --request POST \
--url https://{host}/me/v1/connected-accounts/connect \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"connection": "<string>",
"redirect_uri": "<string>",
"authorization_params": {
"acr_values": "<string>",
"audience": "<string>",
"id_token_hint": "<string>",
"login_hint": "<string>",
"max_age": 1073741823,
"resource": "<string>",
"ui_locales": "<string>"
},
"code_challenge": "<string>",
"code_challenge_method": "<string>",
"scopes": [
"openid",
"offline_access",
"read:tasks",
"write:tasks"
],
"state": "<string>"
}
'import requests
url = "https://{host}/me/v1/connected-accounts/connect"
payload = {
"connection": "<string>",
"redirect_uri": "<string>",
"authorization_params": {
"acr_values": "<string>",
"audience": "<string>",
"id_token_hint": "<string>",
"login_hint": "<string>",
"max_age": 1073741823,
"resource": "<string>",
"ui_locales": "<string>"
},
"code_challenge": "<string>",
"code_challenge_method": "<string>",
"scopes": ["openid", "offline_access", "read:tasks", "write:tasks"],
"state": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
connection: '<string>',
redirect_uri: '<string>',
authorization_params: {
acr_values: '<string>',
audience: '<string>',
id_token_hint: '<string>',
login_hint: '<string>',
max_age: 1073741823,
resource: '<string>',
ui_locales: '<string>'
},
code_challenge: '<string>',
code_challenge_method: '<string>',
scopes: ['openid', 'offline_access', 'read:tasks', 'write:tasks'],
state: '<string>'
})
};
fetch('https://{host}/me/v1/connected-accounts/connect', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/me/v1/connected-accounts/connect",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'connection' => '<string>',
'redirect_uri' => '<string>',
'authorization_params' => [
'acr_values' => '<string>',
'audience' => '<string>',
'id_token_hint' => '<string>',
'login_hint' => '<string>',
'max_age' => 1073741823,
'resource' => '<string>',
'ui_locales' => '<string>'
],
'code_challenge' => '<string>',
'code_challenge_method' => '<string>',
'scopes' => [
'openid',
'offline_access',
'read:tasks',
'write:tasks'
],
'state' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/me/v1/connected-accounts/connect"
payload := strings.NewReader("{\n \"connection\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"authorization_params\": {\n \"acr_values\": \"<string>\",\n \"audience\": \"<string>\",\n \"id_token_hint\": \"<string>\",\n \"login_hint\": \"<string>\",\n \"max_age\": 1073741823,\n \"resource\": \"<string>\",\n \"ui_locales\": \"<string>\"\n },\n \"code_challenge\": \"<string>\",\n \"code_challenge_method\": \"<string>\",\n \"scopes\": [\n \"openid\",\n \"offline_access\",\n \"read:tasks\",\n \"write:tasks\"\n ],\n \"state\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/me/v1/connected-accounts/connect")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"connection\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"authorization_params\": {\n \"acr_values\": \"<string>\",\n \"audience\": \"<string>\",\n \"id_token_hint\": \"<string>\",\n \"login_hint\": \"<string>\",\n \"max_age\": 1073741823,\n \"resource\": \"<string>\",\n \"ui_locales\": \"<string>\"\n },\n \"code_challenge\": \"<string>\",\n \"code_challenge_method\": \"<string>\",\n \"scopes\": [\n \"openid\",\n \"offline_access\",\n \"read:tasks\",\n \"write:tasks\"\n ],\n \"state\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/me/v1/connected-accounts/connect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connection\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"authorization_params\": {\n \"acr_values\": \"<string>\",\n \"audience\": \"<string>\",\n \"id_token_hint\": \"<string>\",\n \"login_hint\": \"<string>\",\n \"max_age\": 1073741823,\n \"resource\": \"<string>\",\n \"ui_locales\": \"<string>\"\n },\n \"code_challenge\": \"<string>\",\n \"code_challenge_method\": \"<string>\",\n \"scopes\": [\n \"openid\",\n \"offline_access\",\n \"read:tasks\",\n \"write:tasks\"\n ],\n \"state\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"auth_session": "<string>",
"connect_params": {
"ticket": "<string>"
},
"connect_uri": "<string>",
"expires_in": 2
}{
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"validation_errors": [
{
"detail": "<string>",
"field": "<string>",
"pointer": "<string>",
"source": "<string>"
}
]
}{
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"validation_errors": [
{
"detail": "<string>",
"field": "<string>",
"pointer": "<string>",
"source": "<string>"
}
]
}{
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"validation_errors": [
{
"detail": "<string>",
"field": "<string>",
"pointer": "<string>",
"source": "<string>"
}
]
}{
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"validation_errors": [
{
"detail": "<string>",
"field": "<string>",
"pointer": "<string>",
"source": "<string>"
}
]
}{
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"validation_errors": [
{
"detail": "<string>",
"field": "<string>",
"pointer": "<string>",
"source": "<string>"
}
]
}承認
Bearer トークンと DPoP トークンは、API の設定に応じてサポートされます
ボディ
application/json
アカウント接続リクエストを作成するためのリクエスト本文。
アカウントをリンクする接続の名前(例: 'google-oauth2'、'facebook')。
Required string length:
1 - 128接続プロセスの完了後にリダイレクトする URI。
Maximum string length:
2048認可リクエスト中に基盤となるIDプロバイダー(IdP)へ送信される認可パラメーターです。これらのパラメーターは、IdP が認可フローをどのように処理するかや、どの権限を要求するかに影響します。
Show child attributes
Show child attributes
code verifier から導出された PKCE の code challenge。
Required string length:
43 - 128code challenge の導出に使用される方式。code_challenge が指定されている場合は必須です。
Allowed value:
"S256"クライアントがIDプロバイダーに要求する権限を定義します。ユーザーを識別するために使用される標準のスコープ(例: 'openid'、'email'、'profile')、必要に応じてリフレッシュトークンを取得するために必要なスコープ(例: 'offline_access')、および保護されたリソースへのアクセスに必要なカスタムスコープを含める必要があります。
Required array length:
1 - 100 elementsRequired string length:
1 - 255例:
[
"openid",
"offline_access",
"read:tasks",
"write:tasks"
]
リクエストと callback の間で state を維持するために使用される不透明な値。
Required string length:
1 - 4096⌘I