Account activity Webhooks, could not authenticate

webhooks
account-activity

#1

Hi,

I have applied for access for the new Twitter account activity webhooks to test my chatbot but have problem registering my endpoint. I think I didn’t mention my app name or id in the registration and now I don’t know how to redo the application. But I already got an email back for my application,

"We have provisioned access to the Account Activity API beta for the single client application you noted in your application for access.

To make requests to the API, you will need to know your Dev Environment name:
Env_name: env-beta"

I tried to register my endpoint using postman and my ngrok url to “POST account_activity/webhooks”, but it returned error 32 “Could not authenticate you.”

So far what I tried:

  1. Double check my authorization (I tried using the same authorization to send DM and it works)
  2. Tried the registration url in postman with “x-www-form-urlencoded” key value
  3. Tried to post the request using “twit”
  4. Double check that my ngrok url is using “https” instead of “http”
  5. Double check that my app access is “Read, write, and direct messages”

Other post mentioned something about consumer key ends with “WL9” when it has access but mine is not, maybe this is the problem? Maybe I need to set up a dev environment? This is my first time using Twitter API

Twitter user id : 961997033811914752
App url: https://apps.twitter.com/app/14787123

Thank you for your help,
Melisa


#2

No reply? *sigh


#3

Hey @MelisaCecilia - you do have access (I just confirmed) for the app you linked (its the only one on your account).

You need to use user level auth when posting to that endpoint. Details are in the docs, but you will need to pass a bearer token with your request.

you can try using twurl to post the request as well.

Stick with it :slight_smile:


#4

Thanks for your help @KyleW !! I managed to link my chatbot to my Twitter test account with the “all” account activity API.

I was using these pages before,
https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/guides/managing-webhooks-and-subscriptions
https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/aaa-standard-dm
I didn’t notice that you have to subscribe to “all”

Thanks again!