---
title: "Token"
description: "Explore comprehensive Token API documentation for seamless integration and efficient token management in your applications. (Gitana 4.0)"
product: "Gitana"
version: "4.0"
url: "/documentation/gitana/4.0/reference/types/token"
---

# <a id="top"></a>Token

An Object

1.  [Cluster](/documentation/gitana/4.0/reference/types/cluster.md)
2.  [Token](/documentation/gitana/4.0/reference/types/token.md)

##### Table of Contents

- [Overview](#top "Overview")
- [Parent](#parent "Parent")
- [Properties](#properties "Properties")
- [Methods](#methods "Methods")
- [Schema](#schema "Schema")

> **Note:** Drop in one of our language drivers to accelerate your development.  
> Here are links to some of our popular [Cookbooks](/documentation/gitana/4.0/developers/cookbooks/overview.md) to help you get started!
> 
> - [C#](/documentation/gitana/4.0/developers/cookbooks/csharp.md)
> - [Go](/documentation/gitana/4.0/developers/cookbooks/go.md)
> - [Java](/documentation/gitana/4.0/developers/cookbooks/java.md)
> - [JavaScript](/documentation/gitana/4.0/developers/cookbooks/javascript2.md)
> - [PHP](/documentation/gitana/4.0/developers/cookbooks/php.md)
> - [Python](/documentation/gitana/4.0/developers/cookbooks/python.md)
> - [Ruby](/documentation/gitana/4.0/developers/cookbooks/ruby.md)

## <a id="parent"></a>Parent

This Token is contained within a [Cluster](/documentation/gitana/4.0/reference/types/cluster.md).

## <a id="properties"></a>Properties

The following properties are available:

| Property | Type | Default | Read-Only | Description |
| --- | --- | --- | --- | --- |
| \_doc | string |  | No | The primary ID |
| \_system | object |  | No | Metadata maintained by the system |
| client\_authorities | array |  | No |  |
| client\_id | string |  | No |  |
| client\_redirect\_uri | string |  | No |  |
| client\_resource\_ids | array |  | No |  |
| expiration | object |  | No |  |
| platform\_id | string |  | No |  |
| registrar\_id | string |  | No |  |
| tenant\_id | string |  | No |  |
| user\_directory\_id | string |  | No |  |
| user\_domain\_id | string |  | No |  |
| user\_identity\_id | string |  | No |  |
| user\_principal\_id | string |  | No |  |
| user\_principal\_name | string |  | No |  |

## <a id="methods"></a>Methods

The following methods are available:

- [Expire Access](#post-tokens-access-accesstokenid-expire "Expire Access")
- [Expire Refresh](#post-tokens-refresh-refreshtokenid-expire "Expire Refresh")
- [Lists Token](#get-tokens-refresh "Lists Token")
- [Lists Token](#get-tokens-access "Lists Token")
- [Read Token](#get-tokens-access-accesstokenid "Read Token")
- [Read Token](#get-tokens-refresh-refreshtokenid "Read Token")

### <a id="post-tokens-access-accesstokenid-expire"></a>Expire Access

POST /tokens/access/{accessTokenId}/expire

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| accessTokenId | true | string |  |
| refresh | false | string |  |

### <a id="post-tokens-refresh-refreshtokenid-expire"></a>Expire Refresh

POST /tokens/refresh/{refreshTokenId}/expire

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| refreshTokenId | true | string |  |
| access | false | string |  |

### <a id="get-tokens-refresh"></a>Lists Token

Retrieves a list of Token instances

GET /tokens/refresh

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| sort | false | object | Defines how to sort fields in the result set |
| skip | false | number | Skips the result set cursor ahead the specified number of records |
| limit | false | number | Specifies the number of records to be handed back in the result set |

This method supports pagination.

#### Response

```json
{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/resultmap_token"
      }
    }
  }
}
```

### <a id="get-tokens-access"></a>Lists Token

Retrieves a list of Token instances

GET /tokens/access

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| sort | false | object | Defines how to sort fields in the result set |
| skip | false | number | Skips the result set cursor ahead the specified number of records |
| limit | false | number | Specifies the number of records to be handed back in the result set |

This method supports pagination.

#### Response

```json
{
  "type": "object",
  "description": "Result Map",
  "properties": {
    "total_rows": {
      "type": "number"
    },
    "offset": {
      "type": "number"
    },
    "size": {
      "type": "number"
    },
    "rows": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/resultmap_token"
      }
    }
  }
}
```

### <a id="get-tokens-access-accesstokenid"></a>Read Token

Reads an instance of a Token

GET /tokens/access/{accessTokenId}

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| accessTokenId | true | string |  |

#### Response

```json
{
  "type": "object",
  "extends": "document",
  "container": "cluster",
  "description": "Token",
  "properties": {
    "expiration": {
      "type": "object"
    },
    "client_id": {
      "type": "string"
    },
    "client_redirect_uri": {
      "type": "string"
    },
    "client_resource_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "client_authorities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "user_directory_id": {
      "type": "string"
    },
    "user_identity_id": {
      "type": "string"
    },
    "user_domain_id": {
      "type": "string"
    },
    "user_principal_id": {
      "type": "string"
    },
    "user_principal_name": {
      "type": "string"
    },
    "platform_id": {
      "type": "string"
    },
    "registrar_id": {
      "type": "string"
    },
    "tenant_id": {
      "type": "string"
    },
    "_doc": null,
    "_system": null
  }
}
```

### <a id="get-tokens-refresh-refreshtokenid"></a>Read Token

Reads an instance of a Token

GET /tokens/refresh/{refreshTokenId}

#### Parameters

| Name | Required | Type | Description |
| --- | --- | --- | --- |
| refreshTokenId | true | string |  |

#### Response

```json
{
  "type": "object",
  "extends": "document",
  "container": "cluster",
  "description": "Token",
  "properties": {
    "expiration": {
      "type": "object"
    },
    "client_id": {
      "type": "string"
    },
    "client_redirect_uri": {
      "type": "string"
    },
    "client_resource_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "client_authorities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "user_directory_id": {
      "type": "string"
    },
    "user_identity_id": {
      "type": "string"
    },
    "user_domain_id": {
      "type": "string"
    },
    "user_principal_id": {
      "type": "string"
    },
    "user_principal_name": {
      "type": "string"
    },
    "platform_id": {
      "type": "string"
    },
    "registrar_id": {
      "type": "string"
    },
    "tenant_id": {
      "type": "string"
    },
    "_doc": null,
    "_system": null
  }
}
```

## <a id="schema"></a>Schema

```json

{
  "type": "object",
  "extends": "document",
  "container": "cluster",
  "description": "Token",
  "properties": {
    "expiration": {
      "type": "object"
    },
    "client_id": {
      "type": "string"
    },
    "client_redirect_uri": {
      "type": "string"
    },
    "client_resource_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "client_authorities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "user_directory_id": {
      "type": "string"
    },
    "user_identity_id": {
      "type": "string"
    },
    "user_domain_id": {
      "type": "string"
    },
    "user_principal_id": {
      "type": "string"
    },
    "user_principal_name": {
      "type": "string"
    },
    "platform_id": {
      "type": "string"
    },
    "registrar_id": {
      "type": "string"
    },
    "tenant_id": {
      "type": "string"
    },
    "_doc": null,
    "_system": null
  },
  "id": "token"
}
```
