We consistently see the following error when making reach calls against campaigns:
{u'errors': [{u'message': u'This request is not properly authenticated', u'code': u'UNAUTHORIZED_ACCESS'}], u'request': {u'params': {}}}
When checking features available for the account related to the campaign that we’re asking for reach against we see that we have the ‘REACH_AND_FREQUENCY_ANALYTICS’ feature on the account.
feature call:
https://ads-api.twitter.com/1/accounts/487m0y/features
return:
{u’data’: [u’AGE_TARGETING’,
u’ALLOW_SKIPPABLE_VIDEOS_FOR_VIDEO_VIEWS_PREROLL_OBJECTIVE’,
u’CPI_CHARGING’,
u’EVENT_TARGETING’,
u’INSTALLED_APP_CATEGORY_TARGETING’,
u’MOBILE_CONVERSION_TRANSACTION_VALUE’,
u’OPTIMIZED_ACTION_BIDDING’,
u’OPTIMIZED_WEBSITE_CONVERSIONS’,
u’REACH_AND_FREQUENCY_ANALYTICS’,
u’VIDEO_APP_DOWNLOAD_CARD’],
reach call
https://ads-api.twitter.com/1/stats/accounts/487m0y/reach/campaigns?{"start_time":%20"2016-05-13T19:00:00Z",%20"campaign_ids":%20"4yot5",%20"account_id":%20"487m0y",%20"end_time":%20"2016-07-05T06:59:00Z"}
return:
u’errors’: [{u’message’: u’This request is not properly authenticated’, u’code’: u’UNAUTHORIZED_ACCESS’}]