From Bright Pattern Documentation
Jump to: navigation, search
(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...")
 
(Updated via BpDeleteTranslateTags script)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<translate>=Setting Twitter Webhook Manually=
+
=Setting the 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:
+
In the unlikely case that you're unable to set the [[Twitter-integration-guide/Configuration/IntegrationAccount|Twitter webhook]] in the Contact Center Administrator application, section Integration Accounts (i.e., when your Twitter credentials are accepted but you receive an authentication error when setting webhook), please try following these manual steps, and then notify our [https://www.brightpattern.com/contact-center-support/ support]:
  
# download twurl (instruction https://developer.twitter.com/en/docs/tutorials/using-twurl)
+
# Download the twurl application; instruction are found at the following link: https://developer.twitter.com/en/docs/tutorials/using-twurl<br><br>
# set credentials in .twurlrc file, example below, the tokens should match those in portal.
+
# Set the following credentials in the .twurlrc file; note that the tokens should match those entered in the Contact Center Administrator application for your Twitter integration account:<br><br>
#:In windows, the path should be in Users/<windows username>/.twurlrc  
+
#:In Windows, the path should be in '''Users/<windows username>/.twurlrc'''
#:In linux, it should be in ~/.twurlrc
+
#:In Linux, the path should be in '''~/.twurlrc'''
# (optional) verify twurl read the .twurlrc file correctly using command:
+
# (Optional) Verify twurl reads the .twurlrc file correctly using the following command: '''twurl accounts'''<br><br>
#: twurl accounts
+
#:Example output:<br><br>
#:Example output:
+
#:''C:\Users\Edmund>twurl accounts''
#:C:\Users\Edmund>twurl accounts
+
#:''<twitter-user-name>''
#:<twitter-user-name>
+
#:  ''SB64DimDrkcE4m85yIfz23g3C (default)''
#:  SB64DimDrkcE4m85yIfz23g3C (default)
+
# Set the webhook using the commands '''change <env_name>''', '''<tenant host name>''', and '''<access token secret>''' to the correct values. There is no need to URL encode the URL parameter (i.e., twurl does it automatically):<br><br>
# 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>"''<br><br>
#:twurl  -X POST "/1.1/account_activity/all/<env_name>/webhooks.json?url=https://<tenant host name>/clientweb/twitter/webhook/<access token secret>"
+
#:Note: If you are successful, you will receive a 2xx HTTP response status code.
#:If successful, it should return 2xx response
+
# In the Contact Center Administrator, section Integration Accounts, click your Twitter integration's '''Set Webhook''' button again using the same credentials. This time, the "Could not authenticate you" error should be gone (i.e., if this is the same issue that was originally noted).
# 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)
 
  
  
Line 32: Line 31:
 
   - edmundwongbp
 
   - edmundwongbp
 
   - SB64DimDrkcE4m85yIfz23g3C
 
   - SB64DimDrkcE4m85yIfz23g3C
</translate>
 

Latest revision as of 04:04, 29 May 2024

• 日本語
• 5.19 • 5.3 • 5.8

Setting the Twitter Webhook Manually

In the unlikely case that you're unable to set the Twitter webhook in the Contact Center Administrator application, section Integration Accounts (i.e., when your Twitter credentials are accepted but you receive an authentication error when setting webhook), please try following these manual steps, and then notify our support:

  1. Download the twurl application; instruction are found at the following link: https://developer.twitter.com/en/docs/tutorials/using-twurl

  2. Set the following credentials in the .twurlrc file; note that the tokens should match those entered in the Contact Center Administrator application for your Twitter integration account:

    In Windows, the path should be in Users/<windows username>/.twurlrc
    In Linux, the path should be in ~/.twurlrc
  3. (Optional) Verify twurl reads the .twurlrc file correctly using the following command: twurl accounts

    Example output:

    C:\Users\Edmund>twurl accounts
    <twitter-user-name>
    SB64DimDrkcE4m85yIfz23g3C (default)
  4. Set the webhook using the commands change <env_name>, <tenant host name>, and <access token secret> to the correct values. There is no need to URL encode the URL parameter (i.e., 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>"

    Note: If you are successful, you will receive a 2xx HTTP response status code.
  5. In the Contact Center Administrator, section Integration Accounts, click your Twitter integration's Set Webhook button again using the same credentials. This time, the "Could not authenticate you" error should be gone (i.e., if this is the same issue that was originally noted).


Example .twurlrc:

---
profiles:
 edmundwongbp:
   SB64DimDrkcE4m85yIfz23g3C:
     username: edmundwongbp
     consumer_key: SB64DimDrkcE4m85yIfz23g3C
     consumer_secret: ddss
     token: dss
     secret: 7xxx
configuration:
 default_profile:
 - edmundwongbp

- SB64DimDrkcE4m85yIfz23g3C

< Previous | Next >