Hi there,

I am wondering if some or all of the IDs in the Ads API are unique or not. My team is thinking about what kind of prefixes are needed or not to ensure properly scoped uniqueness on our end.

I saw this other post, Relative uniqueness of Ads API Ids, which confirms that the following are globally unique between ad accounts:

  • Line Item IDs
  • Campaign IDs
  • Funding Instrument IDs

Question 1: Are the following objects also unique between ad accounts?

  • Media Creatives IDs
  • Promoted Tweets IDs
  • Promoted Accounts IDs

Question 2: Are these IDs unique across different types? eg, could a Promoted Tweet and a Promoted Account have the same ID?

Thanks,
Ian

Hi @iansprout those identifiers are also guaranteed to be unique but I would also recommend implementation that takes safeguards for account security/privacy issues in appropriate ways. If there is additional scoping/tagging by account ID the main thing to be aware of is that multiple user IDs can have access to single account IDs so it can be tricky when you are working with user tokens. The combination of authenticated_user_access endpoint and account/verify_credentials can be used to double check the user access being used, and can test to make sure they are not able to see data that is not related to that account within your platform.

1 Like

Sorry I didn’t read your Question 2 closely enough - for that question, they are NOT guaranteed to be unique across different types (only within a single type of course).

1 Like

Perfect, this is all very helpful, thank you!