From Bright Pattern Documentation
• 日本語
<translate>=Setting Twitter Webhook Manually= In the unlikely case if you're unable to set Twitter webhook via portal, when your Twitter credentials are accepted in portal, but receiving authentication error when setting webhook, please try following these manual steps, and then notify our support:
- download twurl (instruction https://developer.twitter.com/en/docs/tutorials/using-twurl)
- set credentials in .twurlrc file, example below, the tokens should match those in portal.
- In windows, the path should be in Users/<windows username>/.twurlrc
- In linux, it should be in ~/.twurlrc
- (optional) verify twurl read the .twurlrc file correctly using command:
- twurl accounts
- Example output:
- C:\Users\Edmund>twurl accounts
- <twitter-user-name>
- SB64DimDrkcE4m85yIfz23g3C (default)
- set webhook using command, change <env_name>, <tenant host name> and <access token secret> to the correct values , no need to url encode the url parameter (twurl does it automatically):
- twurl -X POST "/1.1/account_activity/all/<env_name>/webhooks.json?url=https://<tenant host name>/clientweb/twitter/webhook/<access token secret>"
- If successful, it should return 2xx response
- Use portal's Twitter Set Webhook button again using the same credentials. This time, the "could not authenticate you" error should be gone ( if this is the same issue we saw)
Example .twurlrc:
--- profiles: edmundwongbp: SB64DimDrkcE4m85yIfz23g3C: username: edmundwongbp consumer_key: SB64DimDrkcE4m85yIfz23g3C consumer_secret: ddss token: dss secret: 7xxx configuration: default_profile: - edmundwongbp - SB64DimDrkcE4m85yIfz23g3C
</translate>/prevnext/