リフレッシュトークンを取得する
curl --request GET \
--url https://{tenantDomain}/api/v2/refresh-tokens \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenantDomain}/api/v2/refresh-tokens"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenantDomain}/api/v2/refresh-tokens', 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://{tenantDomain}/api/v2/refresh-tokens",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/refresh-tokens"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenantDomain}/api/v2/refresh-tokens")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/refresh-tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"next": "<string>",
"refresh_tokens": [
{
"client_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"device": {
"initial_asn": "<string>",
"initial_ip": "<string>",
"initial_user_agent": "<string>",
"last_asn": "<string>",
"last_ip": "<string>",
"last_user_agent": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"idle_expires_at": "2023-11-07T05:31:56Z",
"last_exchanged_at": "2023-11-07T05:31:56Z",
"refresh_token_metadata": {},
"resource_servers": [
{
"audience": "<string>",
"scopes": "<string>"
}
],
"rotating": true,
"session_id": "<string>",
"user_id": "auth0|507f1f77bcf86cd799439020"
}
]
}リフレッシュトークンの取得
特定のユーザーのリフレッシュトークンのページネーションされた一覧を取得します。必要に応じてクライアントIDで絞り込めます。結果は credential_id の昇順でソートされます。
GET
https://{tenantDomain}/api/v2
/
refresh-tokens
リフレッシュトークンを取得する
curl --request GET \
--url https://{tenantDomain}/api/v2/refresh-tokens \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenantDomain}/api/v2/refresh-tokens"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenantDomain}/api/v2/refresh-tokens', 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://{tenantDomain}/api/v2/refresh-tokens",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/refresh-tokens"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenantDomain}/api/v2/refresh-tokens")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/refresh-tokens")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"next": "<string>",
"refresh_tokens": [
{
"client_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"device": {
"initial_asn": "<string>",
"initial_ip": "<string>",
"initial_user_agent": "<string>",
"last_asn": "<string>",
"last_ip": "<string>",
"last_user_agent": "<string>"
},
"expires_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"idle_expires_at": "2023-11-07T05:31:56Z",
"last_exchanged_at": "2023-11-07T05:31:56Z",
"refresh_token_metadata": {},
"resource_servers": [
{
"audience": "<string>",
"scopes": "<string>"
}
],
"rotating": true,
"session_id": "<string>",
"user_id": "auth0|507f1f77bcf86cd799439020"
}
]
}承認
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
クエリパラメータ
取得するリフレッシュトークンの対象ユーザーのID。必須です。
結果をクライアントIDで絞り込みます。user_id が指定されている場合にのみ有効です。
選択の開始位置を示す不透明なカーソル(この値自体は含まれません)。24 時間後に有効期限が切れます。前回のレスポンスの next プロパティから取得します。
1 ページあたりの結果数。デフォルトは 50 です。
必須範囲:
1 <= x <= 100結果に含める、または除外するフィールドのカンマ区切りリストです(include_fields に指定した値に基づきます)。空のままにすると、すべてのフィールドを取得します。
指定したフィールドを含める(true)か、除外する(false)かを指定します。
⌘I