Page-Scoped ID API

The Page-Scoped ID API allows you to get Page-scoped User IDs from App-scoped User IDs.

This API is only available to apps:

  • created before May 1st, 2018, and
  • that have passed App Review

Getting PSIDs from ASIDs

To get a Page-scoped ID from an App-scoped ID, send a POST request to the /pages_id_mapping root node and include the following parameters:

Parameters

ParameterValue TypeDescription

access_token

String

The targeted Page's access token. (To get a scoped User ID for a Page, your app must query the endpoint using that Page's access token.)

appsecret_proof

String

Your appsecret_proof hash. Refer to our Securing Requests document for more information.

ignore_invalid_ids (optional)

Boolean

Default is false. If set to true, invalid IDs will be ignored silently and omitted from the response. Otherwise, an error will be returned with a list of invalid IDs in the error_data property. ASIDs will be rejected if they are incomplete, belong to a different app, or if they are for non-ASID objects (e.g, a Post ID)

user_ids

String

A list of up to 200 App-scoped User IDs to be converted to equivalent Page-scoped IDs for the Page whose Page access token was used to make the request. Separate IDs by a comma (,).

Sample Requests & Responses

Sample Request

curl -i -X POST \
 -d "user_ids=10154673853349851,1001789542988" \
 -d "appsecret_proof=your-appsecret-proof" \
 -d "access_token=the-page-access-token" \
 "https://graph.facebook.com/v2.11/pages_id_mapping"

Sample Response

{
  "10154673853349851":
    {
      "id": "1535748669783931"
    },
  "1001789542988":
    {
      "id": "1061502733949241"
    }
}

Test Pages

To help with testing, you can designate up to 5 Pages as Test Pages. When using a Test Page with the Pages API, the API will return PSIDs instead of ASIDs.

To designate any Page you own as a Test Page, use the Pages API Migration section of your app's App Dashboard (Settings > Advanced > Pages API Migration).

Limits

API Availability

The Page-Scoped ID API will be available for 180 days from the date that your app passed App Review. The Pages API Migration section in your app's App Dashboard (Settings > Advanced > Pages API Migration) will display the number of days remaining for your app.

Rate Limits

Your app can make up to 5M calls, or 1% of the total number of fans across all of the Pages that your app manages, whichever value is smaller.

Error Codes

Error CodeDescription

100

Current app exceeds rate limit

100

Invalid App-scoped User IDs for current App. Invalid IDs will be listed in the error_data property. This error will be ignored if you include the ignore_invalid_ids=true parameter and value in your request.

105

Number of user_ids exceeds the maximum limit of 200 ASIDs.

190

A Page access token is needed to call the API.

200

This App or Page is not allowed to use the Page-Scoped ID API.