From Bright Pattern Documentation
< 5.19:Twitter-integration-guide‎ | Configuration
Revision as of 20:45, 19 February 2020 by Sergem (talk | contribs) (Created page with "<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, bu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
• 日本語
• 5.19 • 5.3 • 5.8

<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:

  1. download twurl (instruction https://developer.twitter.com/en/docs/tutorials/using-twurl)
  2. 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
  3. (optional) verify twurl read the .twurlrc file correctly using command:
    twurl accounts
    Example output:
    C:\Users\Edmund>twurl accounts
    <twitter-user-name>
    SB64DimDrkcE4m85yIfz23g3C (default)
  4. 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
  5. 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/