Twitter webhook registration



I am trying to register a webhook to receive events. But I am getting an error in response as below:

    "errors": [
            "code": 261,
            "message": "Application cannot perform write actions. Contact Twitter Platform Operations through"

I am using application only authentication to perform OAuth2. I am using node js oauth package for this.
What can be the issue here?


Check this thread. You will want to use user access tokens to register (with OAuth 1.0A).

We have a node-based sample if you’d like to compare code.


Thanks @andypiper . I missed the account activity api activation form submission. I have submitted the same. Approximately how long does it take for the activation?


It can take a couple of weeks depending on the current volume of requests. We appreciate your patience.


Hello @andypiper,
I did request for two Twitter Applications to get account activity API activated. I received an email notifying that the account activity API is activated for my app (but I didn’t get which of the two apps was activated as there was no consumer key mentioned in the email). After this email I tried to register the webhook trying with credentials of both the apps but I am getting the below error.

    "errors": [
            "code": 261,
            "message": "Application cannot perform write actions. Contact Twitter Platform Operations through"

Can you please help me out with this?


Any updates on this @andypiper? Let me know if any info like consumer key, etc is required our end.


Please don’t share app keys in public forums :slight_smile:

Unfortunately we cannot help you with individual apps via the forums as private information is needed. You’ll need to go via the platform support forms linked in the error to check here. The error you are seeing would seem to indicate that your app key(s) do not have write privileges, so it would be best to double-check that you’ve got the right ones activated.


I am getting the same issue
[{“code”:261,“message”:"Application cannot perform write actions. Contact Twitter Platform Operations through"}]

Can somebody help me?
My Consumer key is : BPntVVFQDCBjl7WPSoyhYFW16


I am also facing this issue.

My app is approved for Beta activities.

Anyone who can help?


@andypiper can you help me with this.


Seems to use application-only authentication.
Try user context authentication.



How to use user context authentication, can you send examples or link of that.


Python implementation


def oauth_req(url, key, secret, http_method='GET', post_body='', http_headers=None):
    consumer = oauth2.Consumer(key=CONSUMER_KEY, secret=CONSUMER_SECRET)
    token = oauth2.Token(key=key, secret=secret)
    client = oauth2.Client(consumer, token)
    resp, content = client.request(url, method=http_method, body=post_body, headers=http_headers)
    return content

post_body = 'url=' + CALLBACK_ADDRESS
oauth_req('', ACCESS_TOKEN, ACCESS_TOKEN_SECRET, 'POST', post_body)



Its showing error {"errors":[{"code":200,"message":"Forbidden."}]}

Is there any http_headers perameters in this?


I guess you don’t have permission to access the Account Activity API.
Please check the link below.


I already applied for Apply for Account Activity API beta access and I got email from twitter that your application has been approved for beta access with env_name : env-beta

I don’t know why this error occur again and again, I tried to register with php and python, but error is coming in both the format…

If I don’t have permission of Account Activity API then how can I check this?


Perhaps you access wrong url.
The right one is ‘’ (no colon before ‘env-beta’).


I already tried with above url as well. but didnt find solution.

Is there any way to check that my api has write permission?


I believe permission will be given if receive email.
I only know granted users can access their developer dashboard (
If that page is available you must be able to use AAAPI, or it might be better to ask Twitter staff.


See below image of my account dashboard.