User Profile API

The User Profile API lets your bot get more information about the user and personalize their experience.

Calling this API requires passing the user's PSID (page-scoped user ID). You might find the PSID in the message or postback webhooks, or via getContext() in Messenger Extensions inside your bot's webview.

When is a User's Profile Available?

Though you may have a PSID, this does not mean that the user profile is available.

The following events will authorize the bot to have profile permissions:

  • The user entered the bot via a welcome screen and tapped the "Get Started" button.
  • The user sent a message to the bot or tapped a button in the thread.
  • Inside the webview, the bot specifically asked for (and was granted) the user_profile permission.

Notable situations where the user may interact with the bot but not yet have authorized profile permission include interacting with the bot via a web plugin, customer matching, Messenger Conversation Ads, opening shared content from the bot, and opening a Chat Extension they have never used before.


To use the User Profile API, make a GET call to<USER_ID>?access_token=PAGE_ACCESS_TOKEN.


curl -X GET "<USER_ID>?fields=first_name,last_name,profile_pic,locale,timezone,gender&access_token=PAGE_ACCESS_TOKEN"    


Field Name Description


First name


Last name


Profile picture


Locale of the user on Facebook


Timezone, number relative to GMT




Is the user eligible to receive messenger platform payment messages


Details of the last Messenger Conversation Ad user was referred from


A successful User Profile API request returns a json string with the requested details about the user.


  "first_name": "Peter",
  "last_name": "Chang",
  "profile_pic": "",
  "locale": "en_US",
  "timezone": -7,
  "gender": "male"

The information at this API is only available after a person has sent a message to your bot or clicked the "Send to Messenger" plugin. If you call the API before these actions, then you will receive an empty result. You will also receive an empty result if a person has revoked platform permissions on Facebook.


Last Ad Referral

To make it easier for developers to identify which ad the user came from, the details of the last ad user was referred from are available in the user profile in "last_ad_referral" field.

Note that this feature is only available for Messenger Conversation Ads.


  "first_name": "Peter",
  "last_name": "Chang",
  "last_ad_referral": {
    "source": "ADS",
    "type": "OPEN_THREAD",
    "ad_id": "6045246247433"