Hello, following the tutorial, I’m trying to execute a request

curl --request POST --url ‘/1.1/account_activity/webhooks.json?url=’ --header ‘authorization: OAuth oauth_consumer_key=“<CONSUMER_KEY>”, oauth_nonce=“GENERATED”, oauth_signature=“GENERATED”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“GENERATED”, oauth_token=“<ACCESS_TOKEN>”, oauth_version=“1.0”’

substituting my values, in response I get

{“errors”:[{“code”:215,“message”:“Bad Authentication data.”}]}

what could this be related to?

You are calling the Enterprise Accounts Activity API’s webhook register endpoint. Make sure that’s something you have signed up for. If not try using the Premium API – it allows up to 15 account subscriptions for free. Also see to it, if your callback URL endpoint is encoded.

See this for details Premium Account Activity API | Docs | Twitter Developer Platform

2 Likes

Thanks for the quick response, the fact is that I am also fulfilling this request, here is an example
curl --location --request POST ‘//api.twitter.com/1.1/account_activity/all/dialogflow/webhooks.json?url=https%3A%2F%2Fdialogflow-twitter-jydtsncpoa-uc.a.run.app
–header ‘authorization: N87…0CCp6FL’
–header ‘oauth_token: 30089…jaeYlAjSt50KIrIeuB’
–header ‘oauth_nonce: GENERATED’
–header ‘oauth_signature: GENERATED’
–header ‘oauth_timestamp: GENERATED’
–header ‘oauth_signature_method: HMAC-SHA1’
–header ‘oauth_version: 1.0’
–header ‘Cookie: personalization_id=“v1_I…”;
guest_id=v1%3A1…7817216’
and this answer comes
{“errors”:[{“code”:215,“message”:“Bad Authentication data.”}]}
what could be the problem here?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.