---
title: "ステップ 4. 有料コンテンツへのアクセスを確認する"
description: "Adaptyのフィーチャーフラグを使用してサブスクリプションステータスを確認し、ユーザーセグメンテーションを改善する方法を学びましょう。"
---

ユーザーが特定の有料コンテンツにアクセスできるかどうかを確認するには、そのユーザーのアクセスレベルを検証する必要があります。具体的には、ユーザーが少なくとも1つのアクセスレベルを持っているか、またそのレベルが必要なものであるかをチェックします。

これは、利用可能なすべてのアクセスレベルを含むユーザーのプロファイルを確認することで行えます。

それでは、ユーザーがプロダクトを購入できるようにしましょう：

1. 有料コンテンツを表示するボタンをダブルクリックし、右ペインの **Actions** セクションがまだ開いていない場合は開きます。

2. **Action Flow Editor** を開きます。

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

3. **Select Action Trigger** ウィンドウで、**On Tap** を選択します。

4. **No Actions Created** ウィンドウで、**Add Conditional Action** ボタンをクリックします。

5. **UNSET** をクリックしてアクション引数を設定し、`currentProfile` 変数を選択します。これは現在のユーザーのプロファイルに関するデータを保持するAdaptyの変数です。

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

6. 以下のようにフィールドを入力します：
- **Available Options**: Data Structure Field
- **Select Field**: accessLevels
- **Available Options**: Filter List Items
- **Filter Conditions**: 
  1. **Conditions -> Single Condition** を選択し、**UNSET** をクリックします。
  2. **First value** フィールドで、**Source** として **Item in list** を選択し、以下のようにフィールドを入力します：
     - **Available Options**: Data Structure Field
     - **Select Field**: accessLevelIdentifier
  3. フィルター演算子を **Equal to** に設定します。
  4. **Second value** の隣にある **UNSET** をクリックし、**Value** フィールドにアクセスレベルのIDを入力します。この例では `premium` を使用します。
     
     <img src="/assets/shared/img/ff-filter.webp"
     style={{
     border: '1px solid #727272', /* border width and color */
     width: '500px', /* image width */
     display: 'block', /* for alignment */
     margin: '0 auto' /* center alignment */
     }}
     />
     
  5. **Confirm** をクリックし、以下の他のフィールドへの入力を続けます。
- **Available Options**: Item at Index
- **List Index Options**: First
- **Available Options**: Data Structure Field
- **Select Field**: accessLevel
- **Available Options**: Data Structure Field
- **Select Field**: isActive

7. **Confirm** をクリックします。

次に、ユーザーが適切なサブスクリプションを持っているかどうかに応じて、次に何が起こるかのアクションを追加します。プレミアムサブスクライバーが利用できるページに移動させるか、アクセスを購入できるようにペイウォールページを開きます。