メインコンテンツへスキップ
GET
https://{tenantDomain}/api/v2
/
users
/
{user_id}
/
refresh-tokens
Go
package example

import (
    context "context"

    management "github.com/auth0/go-auth0/management/management"
    client "github.com/auth0/go-auth0/management/management/client"
    option "github.com/auth0/go-auth0/management/management/option"
    users "github.com/auth0/go-auth0/management/management/users"
)

func do() {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    request := &users.ListRefreshTokensRequestParameters{
        From: management.String(
            "from",
        ),
        Take: management.Int(
            1,
        ),
    }
    client.Users.RefreshToken.List(
        context.TODO(),
        "user_id",
        request,
    )
}
{
  "next": "<string>",
  "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"
    }
  ]
}

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

パスパラメータ

user_id
string
必須

リフレッシュトークンを取得する対象のユーザーID

クエリパラメータ

include_totals
boolean

合計結果数を含むオブジェクト内で結果を返すか (true)、結果の配列を直接返すか (false、デフォルト) を指定します。

from
string

選択を開始する位置を示す任意のカーソルです(この値自体は含みません)。

take
integer

1ページあたりの結果数。デフォルトは50です。

必須範囲: 1 <= x <= 100

レスポンス

リフレッシュトークンが取得されました

next
string

結果の次ページで "from" クエリパラメーターとして使用するカーソルです。

tokens
object[]