This user-authenticated POST request to create a webhook endpoint fails
Request
curl -X "POST" "https://api.twitter.com/1.1/account_activity/all/dev/webhooks.json?url={Active URL-Encoded Endpoint}" \
-H 'Authorization: OAuth oauth_consumer_key="{Consumer API Key}", oauth_nonce="{Created by PAW.app}", oauth_signature="{Created by PAW.app}", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1537901078", oauth_token="{Access Token}", oauth_version="1.0"'
Response
{"errors":[{"code":32,"message":"Could not authenticate you."}]}
This user-authenticated GET request to verify credentials works as expected:
Request
curl "https://api.twitter.com/1.1/account/verify_credentials.json" \
-H 'Authorization: OAuth oauth_consumer_key="{Consumer API Key}", oauth_nonce="{Created by PAW.app}", oauth_signature="{Created by PAW.app}", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1537901334", oauth_token="{Access Token}", oauth_version="1.0"'
Response
{"id":[snipped full response],"suspended":false,"needs_phone_verification":false}
EDIT 1: Additionally, with twurl installation authenticated to the same app, I receive the same error when requesting to add a new webhook.
EDIT 2: The sample Account Activity Dashboard app configured with ngrok tunnel works, allowing me to create a webhook (so I can now proceed with configuring the CRC response, etc.) but I’d still like to know what went wrong with the straight curl request.
Relevant notes:
- Developer account (same as Discourse username) is approved for premium endpoints
- Application environment named
dev was created…
- …for the app’s tokens I’m using
- OAuth headers generated via PAW.App using same workflow I’ve used with other
OAuth 1-authorized endpoints.
- App has Read, write, and direct messages permissions
- Connection hash of recent failed request:
100bdb3537d5d11c0cbaad0e1b4b02da
Any advice on where to go from here?