Adding webhook url doesn't work

webhooks

#1

A month ago i obtain the beta access to webhooks API. I’m trying to add my webhook url with postman but different errors are shown:

  1. When i autenticate with Auth2 (externally obtaining the token and useing the ‘Authenticate’ header in postman) and do a POST request to “https://api.twitter.com/1.1/account_activity/webhooks.json” with a body ‘x-www-form-urlenconded’ that contains my callback url. I obtain the following error:
{
      "code": 261,
      "message": "Application cannot perform write actions. Contact Twitter Platform Operations through https://support.twitter.com/forms/platform."
}
  1. I’ve read this post but the solition doesn’t works for me. When creating the request with Auth1.0 and writing my credentials found in https://apps.twitter.com/app/APP_ID/keys this error occur:
{
  "code": 32,
  "message": "Could not authenticate you."
}

I’ve read almost all posts refering to this kind of issue but it sems to be a different cause.

Thanks!


#2

@hubtype, that error usually means malformed oauth request or signature.

If by chance you are using Node, here is an example using the requests package:


#3

I’m doing the request with postman , and tokens are cofigured as you show
in node. Also the checkbox about encode OAuth signature is enabled(
disabled also fails )


#4

Hi @joncipriano, I executed your script with my credentials but I get the following error message:

{"errors":[{"code":87,"message":"Client is not permitted to perform this action."}]}

In my “Application Management console > Application Settings > Your Access Token” I can see:
Access Level Read, write, and direct messages

So in theory I have permissions to manage direct messages, but somehow Twitter API won’t let me… is this an issue on your side?


#5

Hi @hubtype, that error means the Twitter app you are using does not have access to the API. Did you apply and receive access through this form? If so, Make sure you use the same app keys that were submitted and approved.