> ## 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.

# Revoke a Token

export const MultiRelatedLinks = ({sections = []}) => {
  if (!sections || sections.length === 0) {
    return null;
  }
  return <div className="space-y-8">
      {sections.map((section, index) => <RelatedLinks key={index} title={section.title} items={section.items} />)}
    </div>;
};

export const RelatedLinks = ({title, items = []}) => {
  const getBadgeClass = badge => {
    if (!badge) return "badge-default";
    const badgeType = badge.toLowerCase().replace(/\s+/g, "-");
    return `badge-${badge === "ガイド" ? "guide" : badgeType}`;
  };
  if (!items || items.length === 0) {
    return null;
  }
  return <div className="my-8">
      {}
      <h3 className="text-sm font-bold uppercase tracking-wider mb-4">{title}</h3>

      {}
      <div className="flex flex-col gap-3">
        {items.map((item, index) => <a key={index} href={item.href} className="py-2 px-3 rounded related_link hover:bg-[#f2f2f2] dark:hover:bg-[#111827] flex items-center gap-3 group no-underline hover:no-underline border-b-0">
            {}
            <span className={`px-2 py-1 rounded-full text-xs font-semibold uppercase tracking-wide flex-shrink-0 ${getBadgeClass(item.badge)}`}>
              {item.badge}
            </span>

            {}
            <span className="text-base">{item.label}</span>
          </a>)}
      </div>
    </div>;
};

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

<RelatedLinks
  title="REQUIRED GUIDES"
  items={[
{ label: translate("Tokens"), href: "/guides/authentication/tokens/index", badge: "GUIDE" }
]}
/>

An Access Token can be revoked at any time by either sending the Access Token or
Refresh Token the <Link href="/reference/post-oauth2-revoke">`POST /oauth2/revoke`</Link> endpoint.

<CodeGroup>
  ```sh cURL theme={null}
  curl -i -X POST "https://api.box.com/oauth2/revoke" \
       -H "content-type: application/x-www-form-urlencoded" \
       -d "client_id=[CLIENT_ID]" \
       -d "client_secret=[CLIENT_SECRET]" \
       -d "token=[ACCESS_TOKEN]"
  ```

  ```typescript Node/TypeScript v10 theme={null}
  await auth.revokeTokens();
  // client's tokens have been revoked
  ```

  ```python Python v10 theme={null}
  client.auth.revoke_token()
  ```

  ```cs .NET v10 theme={null}
  await auth.RevokeTokenAsync();
  ```

  ```swift Swift v10 theme={null}
  try await auth.revokeToken()
  ```

  ```java Java v10 theme={null}
  auth.revokeToken();
  // client's tokens have been revoked
  ```

  ```python Python v4 theme={null}
  oauth.revoke()
  ```

  ```javascript Node v4 theme={null}
  client.revokeTokens("<TOKEN>")
  	.then(() => {
  		// the client's access token have been revoked
  	});
  ```
</CodeGroup>

<Info>
  **Usage in SDKs**

  All of the Box SDKs support manually revoking the current Access Token
  associated with the client. To revoke a specific token, first initialize a new
  SDK with that token and then call the relevant revoke method.
</Info>

<RelatedLinks
  title="RELATED APIS"
  items={[
{ label: translate("Revoke access token"), href: "/reference/post-oauth2-revoke", badge: "POST" }
]}
/>
