{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":21606,"path":"integrate-applications/integration-hub/setup-x-spk.md","title":"Set up the X spoke","bundle":null,"doc_type":null,"release":"australia","body":"\n# Set up the X spoke\n\nIntegrate the ServiceNow instance and X account to authenticate the requests from ServiceNow.\n\n## Before you begin\n\n-   Request an Integration Hub subscription.\n-   Activate the X spoke.\n-   Role required: admin.\n\n## Obtain the token and secret values from the X developer account\n\nCreate an app in the X developer account and obtain the values of Access Token, Access Token Secret, Consumer key, and Consumer Secret for authenticating the requests.\n\n### Before you begin\n\nRole required: X admin.\n\n### Procedure\n\n1.  Log in to the [Developer Portal - Twitter Developer - X \\(formerly Twitter\\)](https://developer.twitter.com/en/portal/dashboard).\n\n2.  Obtain the values of **API Key**, **API Key Secret**, and **Bearer Token**.\n\n    1.  Navigate to **Projects &amp; Apps** &gt; **Default project**.\n\n    2.  Under **Apps**, click **+Add App**.\n\n    3.  Under **App Environment**, choose the required environment and lick **Next**.\n\n    4.  Under **App name**, provide the app name in **DEVELOPMENT APP** and click **Next**.\n\n        Under **Keys &amp; Tokens**, the values of **API Key**, **API Key Secret**, and **Bearer Token** are displayed.\\[Omitted image \"x-spk-keys-tokens.png\"\\] Alt text: Values of API Key, API Key Secret, and Bearer Token.\n\n    5.  Copy and record these values for later use.\n\n3.  Provide the required permissions for OAuth 1.0.\n\n    1.  Navigate to **Projects &amp; Apps** &gt; **Default project**.\n\n    2.  Navigate to the app you had created.\n\n    3.  In the **Settings** tab, under **User authentication settings**, click **Set up**.\n\n    4.  On the User authentication settings page, under **App permissions** select the **Read and write and Direct message** option.\\[Omitted image \"x-spk-app-permissions.png\"\\] Alt text: App permissions.\n\n    5.  Click **Save**.\n\n        The systems prompts you to confirm the permissions.\n\n    6.  Copy and record these values for later use.\n\n    7.  Click **Done**.\n\n4.  Obtain the values of **Access Token** and **Access Token Secret**.\n\n    1.  Navigate to **Projects &amp; Apps** &gt; **Default project**.\n\n    2.  Navigate to the app you had created.\n\n    3.  Click the **Keys and tokens** tab.\n\n    4.  Under **Authentication Tokens**, click **Regenerate** for **Access Token and Secret**.\n\n        System prompts you to confirm.\n\n    5.  Click **Yes, regenerate**.\n\n        The values of **Access Token** and **Access Token Secret** are displayed.\\[Omitted image \"x-spk-access-tok-sec.png\"\\] Alt text: Copy the values of Access Token and Access Secret.\n\n    6.  Copy these values for later use.\n\n\n## Configure a connection for the X spoke \\(formerly Twitter spoke\\)\n\nAdd and configure the X connections to authenticate ServiceNow requests in the X spoke.\n\n### Before you begin\n\n-   Access Token and Access Token Secret of your X developer app.\n-   Consumer key and Consumer Secret of your X developer app.\n-   Ensure that the Application scope is X scope.\n-   Role required: ServiceNow admin\n\nSee the [X Developers](https://developer.twitter.com) documentation for instructions on creating the developer application and gathering the required details.\n\n### About this task\n\nTwo connections, **Twitter** and **Twitter\\_Media**, are provided in the Flow Designer. You must configure both of these connections.\n\n### Procedure\n\n1.  Configure the **Twitter** connection alias.\n\n    1.  Navigate to **All** &gt; **Process Automation** &gt; **Workflow Studio**.\n\n    2.  Click the **Integrations** tab.\n\n    3.  Select the **Connections** tab.\n\n    4.  In the Search all connections field, enter `Twitter`.\n\n    5.  On the Twitter tile, select **View Details**.\n\n        \\[Omitted image \"twitter-alias-view-details.png\"\\] Alt text:\n\n    6.  Select **Configure**.\n\n    7.  On the **Configure Connection** form, fill in the fields.\n\n        |Field|Description|\n        |-----|-----------|\n        |Connection Name|Name to identify the Twitter connection alias record.|\n        |Connection URL|Enter `https://api.twitter.com`.|\n        |Consumer Key|Consumer key of your X developer app.|\n        |Consumer Secret|Consumer secret of your X developer app.|\n        |Access Token|Access token of your X developer app.|\n        |Access Token Secret|Access token secret of your X developer app.|\n\n        \\[Omitted image \"twitter-conn-form.png\"\\] Alt text: Twitter alias connection form.\n\n    8.  Select **Create Connection**.\n\n2.  Configure the **Twitter\\_Media** connection alias.\n\n    1.  Navigate to **All** &gt; **Process Automation** &gt; **Workflow Studio**.\n\n    2.  Click the **Integrations** tab.\n\n    3.  Select the **Connections** tab.\n\n    4.  In the Search all connections field, enter `Twitter_Media`.\n\n    5.  On the Twitter\\_Media tile, select **View Details**.\n\n        \\[Omitted image \"twitter-media-alias-view-details.png\"\\] Alt text: Twitter\\_media alias View Details.\n\n    6.  Select **Configure**.\n\n    7.  On the **Create Connection** form, fill in the fields.\n\n        |Field|Description|\n        |-----|-----------|\n        |Connection Name|Name to identify the Twitter connection alias record.|\n        |Connection URL|Enter `https://upload.twitter.com`.|\n        |Consumer Key|Consumer key of your X developer app.|\n        |Consumer Secret|Consumer secret of your X developer app.|\n        |Access Token|Access token of your X developer app.|\n        |Access Token Secret|Access token secret of your X developer app.|\n\n        \\[Omitted image \"twitter-conn-form.png\"\\] Alt text: Twitter alias connection form.\n\n    8.  Select **Create Connection**.\n\n\n"}}