Campaign Ids comparison


#1

Hi All,

I am trying to find a way where I can compare campaign or rather figure out which campaign is referring to which id.

E.g When I create a new campaign from Twitter console it represents it using a URL and numeric id,

https://ads.twitter.com/accounts/xxxx/campaigns/edit?campaign_id=3212635

But if I create a new campaign using API call it returns me JSON response with alphanumeric id e.g 7tuV etc.

Is there any way to get details of both the ids as a result? Is there any way if I get numeric id used in above url then fetch details of campaign from Twitter using ads API?

I will really appreciate a quick response.

Thanks & regards,
Parag


#2

The alphanumeric ids used in the Ads API are base-36 representations of the integer ids: https://dev.twitter.com/ads/campaigns

In Ruby:

"7tuV".to_i(36)
=> 365287