> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Refresh an Access Token

export const Link = ({href, children, className, ...props}) => {
  const localizedHref = href;
  return <a href={localizedHref} className={className} {...props}>
      {children}
    </a>;
};

The Box Postman Collection uses an **Access Token** to authenticate API
requests on your behalf. Access tokens expire after 1 hour and must be
refreshed.

## Using a refresh token

If you configured a **Box App** in
<Link href="/guides/tooling/postman#step-2-configure-a-box-app">step 2</Link> of the Postman
quickstart, your Box environment should contain a valid `client_id` and
`client_secret`. Together with the `refresh_token`, these can be used to
obtain a new `access_token`.

<Frame border center shadow>
  <img src="https://mintcdn.com/box/4khdLOzRcnsK7EcD/guides/tooling/postman/inspect-environment.png?fit=max&auto=format&n=4khdLOzRcnsK7EcD&q=85&s=aa3bd9a6c18342124964c49127f419a7" alt="A valid client ID and secret in the Postman environment" width="1542" height="1220" data-path="guides/tooling/postman/inspect-environment.png" />
</Frame>

To refresh the access token, open the **Authorization** folder in the Box
Postman Collection and select **Refresh access token**.

<Frame border center shadow>
  <img src="https://mintcdn.com/box/4khdLOzRcnsK7EcD/guides/tooling/postman/select-refresh-access-token.png?fit=max&auto=format&n=4khdLOzRcnsK7EcD&q=85&s=f3f19209503dbd6b725139669c5d5c46" alt="The refresh access token API call in Postman" width="2046" height="1048" data-path="guides/tooling/postman/select-refresh-access-token.png" />
</Frame>

Click **Send**.

<Frame border center shadow>
  <img src="https://mintcdn.com/box/4khdLOzRcnsK7EcD/guides/tooling/postman/postman-send-button.png?fit=max&auto=format&n=4khdLOzRcnsK7EcD&q=85&s=e099b154630b069129955525a5e21615" alt="Postman Send button" width="353" height="247" data-path="guides/tooling/postman/postman-send-button.png" />
</Frame>

When successful, your environment is updated with a new `access_token` and
`refresh_token`, and you can resume making API calls.

<Warning>
  Refresh tokens are single-use and expire after 60 days of inactivity. Each
  time you use a refresh token, a new one is issued and the 60-day window
  resets.

  If a refresh token expires, you need to obtain a new token pair by going
  through the <Link href="/guides/tooling/postman">quickstart</Link> again.
</Warning>

## Automatic token refresh

The Box Postman Collection can automatically detect an expired `access_token`
and refresh it before sending your request. This feature is enabled by
default.

To toggle it, edit your Box Postman environment and set the
`enable_auto_refresh_access_token` variable to `true` or `false`.

<Frame border center shadow>
  <img src="https://mintcdn.com/box/4khdLOzRcnsK7EcD/guides/tooling/postman/inspect-environment.png?fit=max&auto=format&n=4khdLOzRcnsK7EcD&q=85&s=aa3bd9a6c18342124964c49127f419a7" alt="Box Postman environment variables" width="1542" height="1220" data-path="guides/tooling/postman/inspect-environment.png" />
</Frame>

When enabled, the collection checks whether your `access_token` has expired
before each API call and refreshes it automatically if needed.

## Re-authenticating

If your `refresh_token` has expired, typically because the collection hasn't
been used in over 60 days, you need to re-authenticate by repeating the
<Link href="/guides/tooling/postman">quickstart</Link>.

Before restarting, delete your existing **Box** Postman environment. Click
the **gear** icon in the top right, select your environment, and click
**Delete**.

<Frame border center shadow>
  <img src="https://mintcdn.com/box/4khdLOzRcnsK7EcD/guides/tooling/postman/delete-environment.png?fit=max&auto=format&n=4khdLOzRcnsK7EcD&q=85&s=387f4c663af1ca0144042fbe20f2e1ce" alt="Delete the Box Postman environment" width="2272" height="1824" data-path="guides/tooling/postman/delete-environment.png" />
</Frame>

Then follow the <Link href="/guides/tooling/postman">quickstart</Link> from the beginning.

<Warning>
  When re-importing the Box Postman Collection, Postman may ask whether to
  import it as a copy or replace the existing one. Importing as a copy
  preserves any custom changes you have made to API requests.
</Warning>
