Error retrieving account data with Codebird

codebird
ads
php
error-codes

#1

Hello,

I’m using Codebird-php to acces Ads API Twitter and I get this error message:

[message] => Sorry, that page does not exist
[code] => 34

We applied for access to Ads API, and received the email with access permision.

My data information is:

App ID:13133022
Twitter account: UPC_School
Account ID: 40224333

I use this code:

require “codebird-php-3.1.0/src/codebird.php”;
\Codebird\Codebird::setConsumerKey(CONSUMER_KEY, CONSUMER_SECRET); // static, see README

$cb = \Codebird\Codebird::getInstance();

$cb->setToken(ACCESS_TOKEN, ACCESS_TOKEN_SECRET);

$reply = $cb->stats_accounts_ACCOUNT_ID([
‘httpmethod’ => ‘GET’,
‘account_id’ => 40224333 ]);

var_dump($reply);

Do I really have access to Ads API? Is it correct the method I use?

Thank you for your help.


#2

Hey @UPC_School

Unfortunately we can’t help you debug the code, however just to confirm your access, can you trying using twurl to make an authenticated call to an Ads API endpoint?

Thanks!


#3

Ok, I’ll try twurl and I’ll write the result.

Thank you!