Account Activity API beta Access


#1

I applied for the Account Activity API access about three weeks ago. Today, the application status still shows “You’re on the waitlist!”. My account is @snowl1027, the app ID is 14551488.
Please let me know if you need more information. Thanks for your help!


#2

I just looked things up and looks like you were approved. Let us know if you didn’t get an email explaining how to access.

As a quick FYI - we are aware these wait times are less than ideal (or is it longer than ideal?). We are working to improve things. Thanks for sticking with us.


#3

Thank you for the help, Kyle!

I didn’t get email notifying I was approved or explaining how to access. Could you please send that to my account-related email address again? I appreciate your help.


#4

When registering webhooks, I got below error.

object(stdClass)[8]
  public 'errors' => 
    array (size=1)
      0 => 
        object(stdClass)[2]
          public 'code' => int 32
          public 'message' => string 'Could not authenticate you.' (length=27)

#5

This one is tricky - You need to make sure you are passing a user context as well (with a bearer token). Details are in the docs.

Using the example dashboard may help “happy path” test if you have not done so yet.


#6

Hi Kyle. I got the bearer token via below code.

$key = urlencode(CONSUMER_KEY);
$secret = urlencode(CONSUMER_SECRET);
$basic_credentials = base64_encode($key . ':' . $secret);

$ch = curl_init('https://api.twitter.com/oauth2/token');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Basic '.$basic_credentials, 'Content- Type: application/x-www-form-urlencoded;charset=UTF-8'));
curl_setopt($ch, CURLOPT_POSTFIELDS, 'grant_type=client_credentials');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$token = json_decode(curl_exec($ch));
curl_close($ch);

if (isset($token->token_type) && $token->token_type == 'bearer') {
  $bearer_access_token = $token->access_token;
} 

Then I registered webhook using the bearer token. It returned below error.

{"errors":[{"code":89,"message":"Invalid or expired token."}]} 

In the docs I haven’t found how to pass the user context. Could you please explain more about “passing a user context as well (with a bearer token)”?

Thank you!


#7

Hello @Snowl1027,

When setting up your webhooks, use the consumer key, consumer secret, access token, and access token secret associated with the app that has been whitelisted for use of the AAAPI.


#9

It works! Thank you @LeBraat


#10