> ## Documentation Index
> Fetch the complete documentation index at: https://x-preview-oauth-2-ios.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

export const Button = ({href, children}) => {
  return <div className="not-prose group">
    <a href={href}>
      <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-full group-hover:opacity-[0.9] font-medium">
        <span>
          {children}
        </span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

### Likes lookup

With endpoints in the Likes lookup group, you can retrieve a list of accounts that have liked a Post, or a list of Posts that an account has liked. These endpoints include:

* Posts liked by a user - GET /2/users/:id/liked\_tweets
* Users who have liked a Post - GET /2/tweets/:id/liking\_users

You can authenticate these endpoints with either [OAuth 1.0a User Context](/resources/fundamentals/authentication) or [OAuth 2.0 Bearer Token](/resources/fundamentals/authentication#oauth-2-0). For the liked Posts endpoints, pagination tokens will be provided for paging through large sets of results.

The liking users endpoint limits you to a total of 100 liking accounts per post for all time.  Additionally, the liked Posts endpoint is also subject to the monthly [Post cap](/x-api/fundamentals/post-cap) applied at the Project level.
 

### Manage Likes

The manage Likes endpoints enable you to like or unlike a specified Post on behalf of an authenticated account. For this endpoint group, there are two methods available POST and DELETE. The POST method allows you to like a Post, and the DELETE method will enable you to unlike a Post.

Since you are making requests on behalf of a user, you must authenticate these endpoints with [OAuth 1.0a User Context](/resources/fundamentals/authentication) and use the Access Tokens associated with the user, which can be generated using the [3-legged OAuth flow](/resources/fundamentals/authentication#oauth-1-0a-2)/obtaining-user-access-tokens). You can like a Post from your account or an account of an authenticated user. With both endpoints, there is a user rate limit of 50 requests per 15 minutes per endpoint. 
 

To access these endpoint, you must have an approved [developer account](/resources/fundamentals/developer-portal). When authenticating, you must use keys and tokens from a [developer App](/resources/fundamentals/developer-apps) that is located within a [Project](/resources/fundamentals/projects). 

Learn more about getting access to the X API v2 endpoints in our [getting started](/x-api/getting-started/about-x-api) page.

<div class="flex space-x-2">
  <Button href="/x-api/posts/likes/quickstart/likes-lookup">
    Quick start
  </Button>

  <Button href="https://github.com/xdevplatform/Twitter-API-v2-sample-code">
    Sample code
  </Button>

  <Button href="https://app.getpostman.com/run-collection/9956214-784efcda-ed4c-4491-a4c0-a26470a67400">
    Run in Postman
  </Button>
</div>
