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

# v1 から v2 へ

> これまで standard v1.1 の POST friendships/create および POST friendships/destroy を利用してきた方に向けたガイドです。X API v2 スタンダード階層の移行に関するリファレンスドキュメントです。

export const Button = ({href, children}) => {
  return <div className="not-prose">
    <a href={href}>
      <button className="x-btn">
        <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>;
};

#### Manage follows: Standard v1.1 と X API v2 の比較

これまで standard v1.1 の [POST friendships/create](https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-create) および [POST friendships/destroy](https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-destroy) エンドポイントを利用してきた方向けに、standard と X API v2 の manage follows エンドポイントの類似点と相違点を理解するのに役立つことを目的としたガイドです。

* **類似点**
  * OAuth 1.0a User Context
* **相違点**
  * エンドポイント URL
  * App と Project の要件
  * HTTP メソッド
  * リクエストパラメータ

#### 類似点

**OAuth 1.0a User Context 認証方式**

いずれのエンドポイントバージョンも [OAuth 1.0a User Context](/resources/fundamentals/authentication#oauth-1-0a-2) をサポートしています。したがって、以前 standard v1.1 の manage follows エンドポイントのいずれかを利用していた場合、X API v2 版へ移行しても同じ認証方式を継続して利用できます。

#### 相違点

**エンドポイント URL**

* Standard v1.1 エンドポイント:
  * POST [https://api.x.com/1.1/friendships/create.json](https://api.x.com/1.1/friendships/create.json)
    (ユーザーをフォロー)
  * POST [https://api.x.com/1.1/friendships/destroy.json](https://api.x.com/1.1/friendships/destroy.json)
    (ユーザーのフォローを解除)
* X API v2 エンドポイント:
  * POST [https://api.x.com/2/users/:id/following](https://api.x.com/2/users/:id/following)
    (ユーザーをフォロー)
  * DELETE [https://api.x.com/2/users/:source\\\_user\\\_id/following/:target\\\_user\\\_id](https://api.x.com/2/users/:source\\_user\\_id/following/:target\\_user\\_id)
    (ユーザーのフォローを解除)

**App と Project の要件**

X API v2 エンドポイントでは、リクエスト認証時に [Project](/resources/fundamentals/developer-apps) に紐づく [developer App](/resources/fundamentals/developer-apps) の認証情報の使用が必須です。
