接受企业邀请
curl --request POST \
--url https://api.qbank.cl/platform/v1/me/invites/{inviteID}/accept \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "7f3a9c1e4b5d4e6f8a9b0c1d2e3f4a5b6c7d8e9f"
}
'import requests
url = "https://api.qbank.cl/platform/v1/me/invites/{inviteID}/accept"
payload = { "token": "7f3a9c1e4b5d4e6f8a9b0c1d2e3f4a5b6c7d8e9f" }
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({token: '7f3a9c1e4b5d4e6f8a9b0c1d2e3f4a5b6c7d8e9f'})
};
fetch('https://api.qbank.cl/platform/v1/me/invites/{inviteID}/accept', 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://api.qbank.cl/platform/v1/me/invites/{inviteID}/accept",
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([
'token' => '7f3a9c1e4b5d4e6f8a9b0c1d2e3f4a5b6c7d8e9f'
]),
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://api.qbank.cl/platform/v1/me/invites/{inviteID}/accept"
payload := strings.NewReader("{\n \"token\": \"7f3a9c1e4b5d4e6f8a9b0c1d2e3f4a5b6c7d8e9f\"\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://api.qbank.cl/platform/v1/me/invites/{inviteID}/accept")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"7f3a9c1e4b5d4e6f8a9b0c1d2e3f4a5b6c7d8e9f\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/me/invites/{inviteID}/accept")
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 \"token\": \"7f3a9c1e4b5d4e6f8a9b0c1d2e3f4a5b6c7d8e9f\"\n}"
response = http.request(request)
puts response.read_body{
"member_id": "9a8b7c6d-5e4f-4a3b-8c9d-0e1f2a3b4c5d",
"account_id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"role": "operator",
"linked": true
}{
"error": "invalid_token",
"message": "the invitation is invalid or expired"
}{
"error": "account_required",
"message": "this endpoint requires an account credential"
}{
"error": "not_found",
"message": "resource not found"
}{
"error": "invalid_state",
"message": "the invitation was already decided"
}{
"error": "invite_expired",
"message": "the invitation expired; ask the company to invite you again"
}接受企业邀请
用邮件中的令牌接受待处理邀请。会话邮箱必须与被邀请邮箱完全一致;接受后创建关联登录(同一凭据,企业级角色)。仅限人工会话。
POST
/
v1
/
me
/
invites
/
{inviteID}
/
accept
接受企业邀请
curl --request POST \
--url https://api.qbank.cl/platform/v1/me/invites/{inviteID}/accept \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "7f3a9c1e4b5d4e6f8a9b0c1d2e3f4a5b6c7d8e9f"
}
'import requests
url = "https://api.qbank.cl/platform/v1/me/invites/{inviteID}/accept"
payload = { "token": "7f3a9c1e4b5d4e6f8a9b0c1d2e3f4a5b6c7d8e9f" }
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({token: '7f3a9c1e4b5d4e6f8a9b0c1d2e3f4a5b6c7d8e9f'})
};
fetch('https://api.qbank.cl/platform/v1/me/invites/{inviteID}/accept', 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://api.qbank.cl/platform/v1/me/invites/{inviteID}/accept",
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([
'token' => '7f3a9c1e4b5d4e6f8a9b0c1d2e3f4a5b6c7d8e9f'
]),
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://api.qbank.cl/platform/v1/me/invites/{inviteID}/accept"
payload := strings.NewReader("{\n \"token\": \"7f3a9c1e4b5d4e6f8a9b0c1d2e3f4a5b6c7d8e9f\"\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://api.qbank.cl/platform/v1/me/invites/{inviteID}/accept")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"7f3a9c1e4b5d4e6f8a9b0c1d2e3f4a5b6c7d8e9f\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/me/invites/{inviteID}/accept")
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 \"token\": \"7f3a9c1e4b5d4e6f8a9b0c1d2e3f4a5b6c7d8e9f\"\n}"
response = http.request(request)
puts response.read_body{
"member_id": "9a8b7c6d-5e4f-4a3b-8c9d-0e1f2a3b4c5d",
"account_id": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"role": "operator",
"linked": true
}{
"error": "invalid_token",
"message": "the invitation is invalid or expired"
}{
"error": "account_required",
"message": "this endpoint requires an account credential"
}{
"error": "not_found",
"message": "resource not found"
}{
"error": "invalid_state",
"message": "the invitation was already decided"
}{
"error": "invite_expired",
"message": "the invitation expired; ask the company to invite you again"
}