Completar una solicitud de cuenta conectada
curl --request POST \
--url https://{host}/me/v1/connected-accounts/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auth_session": "<string>",
"connect_code": "<string>",
"redirect_uri": "<string>",
"code_verifier": "<string>"
}
'import requests
url = "https://{host}/me/v1/connected-accounts/complete"
payload = {
"auth_session": "<string>",
"connect_code": "<string>",
"redirect_uri": "<string>",
"code_verifier": "<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({
auth_session: '<string>',
connect_code: '<string>',
redirect_uri: '<string>',
code_verifier: '<string>'
})
};
fetch('https://{host}/me/v1/connected-accounts/complete', 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/complete",
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([
'auth_session' => '<string>',
'connect_code' => '<string>',
'redirect_uri' => '<string>',
'code_verifier' => '<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/complete"
payload := strings.NewReader("{\n \"auth_session\": \"<string>\",\n \"connect_code\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"code_verifier\": \"<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/complete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"auth_session\": \"<string>\",\n \"connect_code\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"code_verifier\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/me/v1/connected-accounts/complete")
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 \"auth_session\": \"<string>\",\n \"connect_code\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"code_verifier\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"access_type": "offline",
"connection": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"scopes": [
"<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>"
}
]
}{
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"validation_errors": [
{
"detail": "<string>",
"field": "<string>",
"pointer": "<string>",
"source": "<string>"
}
]
}Completar solicitud de cuenta conectada
Completa un flujo de autorización iniciado previamente para vincular la cuenta del usuario autenticado con un proveedor de identidad externo.
POST
https://{host}/me/v1
/
connected-accounts
/
complete
Completar una solicitud de cuenta conectada
curl --request POST \
--url https://{host}/me/v1/connected-accounts/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"auth_session": "<string>",
"connect_code": "<string>",
"redirect_uri": "<string>",
"code_verifier": "<string>"
}
'import requests
url = "https://{host}/me/v1/connected-accounts/complete"
payload = {
"auth_session": "<string>",
"connect_code": "<string>",
"redirect_uri": "<string>",
"code_verifier": "<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({
auth_session: '<string>',
connect_code: '<string>',
redirect_uri: '<string>',
code_verifier: '<string>'
})
};
fetch('https://{host}/me/v1/connected-accounts/complete', 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/complete",
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([
'auth_session' => '<string>',
'connect_code' => '<string>',
'redirect_uri' => '<string>',
'code_verifier' => '<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/complete"
payload := strings.NewReader("{\n \"auth_session\": \"<string>\",\n \"connect_code\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"code_verifier\": \"<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/complete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"auth_session\": \"<string>\",\n \"connect_code\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"code_verifier\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/me/v1/connected-accounts/complete")
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 \"auth_session\": \"<string>\",\n \"connect_code\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"code_verifier\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"access_type": "offline",
"connection": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"scopes": [
"<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>"
}
]
}{
"detail": "<string>",
"status": 123,
"title": "<string>",
"type": "<string>",
"validation_errors": [
{
"detail": "<string>",
"field": "<string>",
"pointer": "<string>",
"source": "<string>"
}
]
}Autorizaciones
Los tokens Bearer y DPoP son compatibles según la configuración de la API
Cuerpo
application/json
El identificador de la sesión de autenticación
Maximum string length:
64El código de autorización devuelto por el flujo de conexión
Required string length:
1 - 46El URI de redirección utilizado en la solicitud original
Maximum string length:
2048El code verifier de PKCE
Required string length:
43 - 128Respuesta
La solicitud de cuenta conectada se completó correctamente
El tipo de acceso, siempre "offline"
Opciones disponibles:
offline El nombre de la conexión
Cadena de fecha ISO que indica cuándo se creó la cuenta conectada
El identificador único de la cuenta conectada
Cadena de fecha ISO que indica cuándo expira el Token de actualización (opcional)
Matriz de alcances concedidos
⌘I