Passer au contenu principal
GET
https://{tenantDomain}/api/v2
/
refresh-tokens
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new ManagementClient(
            token: "<token>"
        );

        await client.RefreshTokens.ListAsync(
            new GetRefreshTokensRequestParameters {
                UserId = "user_id",
                ClientId = "client_id",
                From = "from",
                Take = 1,
                Fields = "fields",
                IncludeFields = true
            }
        );
    }

}
{
  "refresh_tokens": [
    {
      "id": "<string>",
      "user_id": "auth0|507f1f77bcf86cd799439020",
      "created_at": "2023-11-07T05:31:56Z",
      "idle_expires_at": "2023-11-07T05:31:56Z",
      "expires_at": "2023-11-07T05:31:56Z",
      "device": {
        "initial_ip": "<string>",
        "initial_asn": "<string>",
        "initial_user_agent": "<string>",
        "last_ip": "<string>",
        "last_asn": "<string>",
        "last_user_agent": "<string>"
      },
      "client_id": "<string>",
      "session_id": "<string>",
      "rotating": true,
      "resource_servers": [
        {
          "audience": "<string>",
          "scopes": "<string>"
        }
      ],
      "refresh_token_metadata": {},
      "last_exchanged_at": "2023-11-07T05:31:56Z"
    }
  ],
  "next": "<string>"
}

Autorisations

Authorization
string
header
requis

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

Paramètres de requête

user_id
string
requis

ID of the user whose refresh tokens to retrieve. Required.

client_id
string

Filter results by client ID. Only valid when user_id is provided.

from
string

An opaque cursor from which to start the selection (exclusive). Expires after 24 hours. Obtained from the next property of a previous response.

take
integer

Number of results per page. Defaults to 50.

Plage requise: 1 <= x <= 100
fields
string

Comma-separated list of fields to include or exclude (based on value provided for include_fields) in the result. Leave empty to retrieve all fields.

include_fields
boolean

Whether specified fields are to be included (true) or excluded (false).

Réponse

The refresh tokens were retrieved.

refresh_tokens
object[]
next
string

A cursor to be used as the "from" query parameter for the next page of results.