---
title: "AppsFlyer S2S API 2 から 3 への切り替え"
description: "Adapty で AppsFlyer S2S API 2 から 3 へアップグレードする方法。"
---

[AppsFlyer の公式 What's New](https://support.appsflyer.com/hc/en-us/articles/20509378973457-Bulletin-Upgrading-the-AppsFlyer-S2S-API) によると、API 利用をより安全にし、不正を減らすために、AppsFlyer はアプリ内イベント向けのサーバー間 (S2S) API をアップグレードしました。既存のエンドポイントは将来的に廃止される予定であるため、切り替えの計画を早めに始めることをおすすめします。

Adapty は AppsFlyer S2S API 3 に対応しており、API 2 からスムーズに切り替えられます。ただし、この切り替えは一方向です。一度変更すると API 2 に戻すことはできません。

AppsFlyer S2S API 2 から 3 に切り替えるには：

1. [AppsFlyer サイト](https://www.appsflyer.com/home)を開いてログインします。

2. ダッシュボード左上の **Your account name** -> **Security Center** をクリックします。

   

  <img src="/assets/shared/img/be299ea-appsflyer_security_center.webp"
  style={{
    border: '1px solid #727272', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

3. **Manage your account security** ウィンドウで、**Manage your AppsFlyer API and S2S tokens** ボタンをクリックします。

4. S2S トークンがない場合は **New token** ボタンをクリックします。すでにある場合は手順 8 に進んでください。

   

  <img src="/assets/shared/img/7934920-appsflyer_new_token.webp"
  style={{
    border: '1px solid #727272', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

5. **New token** ウィンドウで、トークンの名前を入力します。この名前はあなただけの管理用です。

6. **Choose type** リストから **S2S** を選択します。

7. **Create new token** ボタンをクリックして新しいトークンを保存することを忘れずに。

8. **Tokens** ウィンドウで S2S トークンをコピーします。

   

  <img src="/assets/shared/img/d014c25-appsflyer_tokens.webp"
  style={{
    border: '1px solid #727272', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

9. Adapty ダッシュボードで [**Integrations** -> **AppsFlyer**](https://app.adapty.io/integrations/appsflyer) を開きます。

10. **AppsFlyer S2S API** フィールドで **API 3** を選択します。

    

  <img src="/assets/shared/img/c0b3e72-appsflyer_switch_API.webp"
  style={{
    border: '1px solid #727272', /* border width and color */
    width: '700px', /* image width */
    display: 'block', /* for alignment */
    margin: '0 auto' /* center alignment */
  }}
/>

11. コピーした S2S キーを **Dev key for iOS** と **Dev key for Android** フィールドに貼り付けます。

12. **Save** ボタンをクリックして切り替えを確定します。

この操作が完了すると、インテグレーションは即座に AppsFlyer S2S API 3 に切り替わり、新しいイベントは新しい URL `https://api3.appsflyer.com/inappevent` に送信されます。