5

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?

David
  • 127
  • 1
  • 6

2 Answers2

2

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

Sam H
  • 174
  • 4
  • Yes, I read that, but it doesn't necessarily mean that they aren't unique across different pages. @WizKid commented that in fact they are globally unique. – David Dec 25 '16 at 03:02
  • Facebook could make PSIDs globally unique (and they may well be), however the documentation is telling you that the PSIDs might not be globally unique (what if Facebook change the current implementation in the future?). It shouldn't be difficult to combine page ID and PSID together to form a key for your database of conversations – Sam H Dec 26 '16 at 10:31
  • 2
    It looks like PSID are Globally unique: https://developers.facebook.com/docs/pages/access-tokens/psid-api/faq/#faq_267296560579051 > **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. – Savageman Jan 21 '19 at 10:14
0

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

Community
  • 1
  • 1
Laszlo Schürg
  • 521
  • 3
  • 6