---
title: Customizing access token lifetime
description: When defining a custom resource in PingOne, you can customize the access token lifetime as needed and add relevant scopes. The access token lifetime defaults to 1 hour.
component: pingone
page_id: pingone:applications:p1_customizing_access_token_lifetime
canonical_url: https://docs.pingidentity.com/pingone/applications/p1_customizing_access_token_lifetime.html
revdate: January 10, 2025
section_ids:
  about-this-task: About this task
  steps: Steps
---

# Customizing access token lifetime

When defining a custom resource in PingOne, you can customize the access token lifetime as needed and add relevant scopes. The access token lifetime defaults to 1 hour.

## About this task

When defining an OpenID Connect (OIDC) *(tooltip: \<div class="paragraph">
\<p>An authentication protocol built on top of OAuth that authenticates users and enables clients (relying parties) of all types to request and receive information about authenticated sessions and users. OIDC is extensible, allowing clients to use optional features such as encryption of identity data, discovery of OpenID Providers (OAuth authorization servers), and session management.\</p>
\</div>)*-based application, you can specify the resources that the application can request access to by adding the relevant scopes to the application. When an application requests an access token from PingOne so that it can access a custom resource, the application sends the required scopes in the request. The lifetime of the access token is determined by the access token lifetime set in that custom resource.

## Steps

1. Go to **Applications > Resources**.

2. Click the **+** icon.

3. In the **Create Resource Profile** step, enter the following information:

   * **Resource Name**: A unique identifier for the resource.

   * **Audience** (optional): The intended audience for the resource. If you don't provide a value, PingOne will default to the resource name.

   * **Description** (optional): A brief description of the resource.

   * **Access token time to live (seconds)**: The maximum time that the access token will be valid for use in the application, in seconds.

4. Click **Next**.

5. For **Attributes**, map resource attributes to user attributes in PingOne.

   1. Enter a resource attribute and then select the corresponding PingOne attribute from the list.

   2. To add an attribute, click the **[icon: plus, set=fa]Add** button.

6. Click **Next**.

7. In the **Scopes** step, configure the appropriate scopes for the resource. Each resource can have one or more scopes.

   To add a scope, click **[icon: plus, set=fa]Add Scope** and enter the following:

   * **Scope Name**: The name of the scope to be used for this resource. Scopes are defined by the resource server.

   * **Description** (optional): A brief description of the scope.

8. Click **Save**.

9. To add the scope to an application, go to **Applications > Applications**, and browse or search for the appropriate application.

10. On the **Resources** tab, click the **Pencil** icon.

11. Locate the scope that you previously added to your resource and click the checkbox next to the scope.

12. Click **Save**.
