Are Facebook Messenger page-scoped IDs globally unique?

1k views Asked by At

I understand that the same user will have different page-scoped IDs (PSIDs) across different pages. But is it guaranteed that no two users will have the same PSID across different pages?

For example, is it possible that user A has PSID 1234 while messaging page X, and user B has the same PSID 1234 when messaging page Y?

Technically user A and user B would be differentiable even if they have the same PSID because they are messaging different pages. But can I assume that there will be no overlap on PSIDs across all pages, so that I may use the PSID as a globally unique ID regardless of the particular page?

2

There are 2 answers

3
Sam H On

Facebook don't guarantee the page-scoped IDs (PSIDs) to be unique across different pages - a PSID may represent user A on page X, but user B on page Y.

When representing a user, these IDs are page-scoped IDs (PSID). This means that the IDs of users are unique for a given page.

https://developers.facebook.com/docs/messenger-platform/webhook-reference#format

0
Laszlo Schürg On

Yes, Facebook PSID are globally unique as @Savegeman already mentioned.

Are Page Scoped IDs globally unique?

Yes, a PSID for a user on page will never be the same for a different user on a different page.

[Previous link was not valid anymore, adding new link here:] https://developers.facebook.com/docs/pages/support#faq_267296560579051