Go
package example
import (
context "context"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
client.RefreshTokens.Get(
context.TODO(),
"id",
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.refreshTokens.get("id");
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.refreshTokens.get("id");
}
main();curl --request GET \
--url https://{tenantDomain}/api/v2/refresh-tokens/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenantDomain}/api/v2/refresh-tokens/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/refresh-tokens/{id}",
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;
}HttpResponse<String> response = Unirest.get("https://{tenantDomain}/api/v2/refresh-tokens/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/refresh-tokens/{id}")
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{
"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"
}リフレッシュトークンの取得
リフレッシュトークンの情報を取得します。
GET
https://{tenantDomain}/api/v2
/
refresh-tokens
/
{id}
Go
package example
import (
context "context"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)
func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
client.RefreshTokens.Get(
context.TODO(),
"id",
)
}import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.refreshTokens.get("id");
}
main();import { ManagementClient } from "auth0";
async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.refreshTokens.get("id");
}
main();curl --request GET \
--url https://{tenantDomain}/api/v2/refresh-tokens/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenantDomain}/api/v2/refresh-tokens/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenantDomain}/api/v2/refresh-tokens/{id}",
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;
}HttpResponse<String> response = Unirest.get("https://{tenantDomain}/api/v2/refresh-tokens/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenantDomain}/api/v2/refresh-tokens/{id}")
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{
"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 です。
リフレッシュトークンが作成された日時
リフレッシュトークンの発行または交換時に使用されたデバイス
Show child attributes
Show child attributes
リフレッシュトークンが作成された日時
リフレッシュトークンの ID です。
リフレッシュトークンが作成された日時
リフレッシュトークンが作成された日時
リフレッシュトークンに関連付けられたメタデータ。文字列値を持つオブジェクト形式です(最大255文字)。メタデータのプロパティは最大25個まで指定できます。
この refresh-token に関連付けられたリソースサーバー ID と、それぞれに付与されたスコープの一覧です。
Show child attributes
Show child attributes
このトークンがローテーション型リフレッシュトークンである場合は True です。
このリフレッシュトークンの取得に使用された認証済みセッションのID
他の API の操作時に使用できるユーザーの ID です。
⌘I