Hi,
I’m trying to register a webhook URL (Sandbox user so far). I’ve read the chapters on authorization over and over again to get the oauth parameters right and I’ve tried both using my own oauth signature implementation and a lib (https://github.com/tim/erlang-oauth). I get the same Oauth string as result, so I think the oauth signing is correct. However, when I send the POST to the twitter account_activity endpoint, I always get a 401 with error 32 back. If I use the same Oauth data in a GET to https://api.twitter.com/1.1/account/verify_credentials.json, I also get a 401 with error 32 as a result.
I’ve read all the tips in the troubleshooting guide and I’ve double checked that everything is set up correctly in my app account (I have the consumer API keys and the access token + secret as well as an environment name plus permissions “read, write, and direct messages” for the app). I’ve also searched the forum for solutions applicable to my problem, but still haven’t been able to get it working.
Oh, app-only authentication works btw. I can request and receive a valid Bearer token. (EDIT: I know this is irrelevant for registering the webhook in a user context, which is what I need, but it proves the access token and secret are valid at least).
I wonder what I’m missing?
Here’s what a request of mine typically looks like:
curl --request POST --url ‘https://api.twitter.com/1.1/account_activity/all/my_env/webhooks.json?url=https%3A%2F%2Fmy_domain.com%2Ftwitter%2Fwebhooks’ --header ‘authorization: OAuth oauth_consumer_key=“THE_CONSUMER_KEY”, oauth_nonce=“BQXMSLFYFCDIRZIECJOINJDPLNDRTRFL”, oauth_signature=“kJqv…6c%3D”, oauth_signature_method=“HMAC-SHA1”, oauth_timestamp=“1539608214”, oauth_token=“THE_ACCESS_TOKEN”, oauth_version=“1.0”’
Do you see anything obviously incorrect with it?
I truly appreciate any help and input! Thanks!