Obtain the token and secret values from the X developer account

  • Release version: Washingtondc
  • Updated August 1, 2024
  • 1 minute to read
  • Create 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.

    Before you begin

    Role required: admin

    Procedure

    1. Log in to the Developer Portal - Twitter Developer - X (formerly Twitter).
    2. Obtain the values of API Key, API Key Secret, and Bearer Token.
      1. Navigate to Projects & Apps > Default project.
      2. Under Apps, click +Add App.
      3. Under App Environment, choose the required environment and lick Next.
      4. Under App name, provide the app name in DEVELOPMENT APP and click Next.
        Under Keys & Tokens, the values of API Key, API Key Secret, and Bearer Token are displayed.Values of API Key, API Key Secret, and Bearer Token.
      5. Copy and record these values for later use.
    3. Provide the required permissions for OAuth 1.0.
      1. Navigate to Projects & Apps > Default project.
      2. Navigate to the app you had created.
      3. In the Settings tab, under User authentication settings, click Set up.
      4. On the User authentication settings page, under App permissions select the Read and write and Direct message option.App permissions.
      5. Click Save.
        The systems prompts you to confirm the permissions.
      6. Copy and record these values for later use.
      7. Click Done.
    4. Obtain the values of Access Token and Access Token Secret.
      1. Navigate to Projects & Apps > Default project.
      2. Navigate to the app you had created.
      3. Click the Keys and tokens tab.
      4. Under Authentication Tokens, click Regenerate for Access Token and Secret.
        System prompts you to confirm.
      5. Click Yes, regenerate.
        The values of Access Token and Access Token Secret are displayed.Copy the values of Access Token and Access Secret.
      6. Copy these values for later use.