> ## Documentation Index
> Fetch the complete documentation index at: https://docs.postiz.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Threads

> How to add Threads to your system

<Snippet file="never-share.mdx" />

<Note>
  This integration requires that you have setup a Meta for Developers account already. You can start by going to the [Meta/Facebook Developer Portal](https://developers.facebook.com/apps).

  This is a complex integration, and it may take some time to get it right. If you have any issues, please reach out to us on the Postiz Discord.
</Note>

<Warning>
  Threads requires the `THREADS_APP_ID` and `THREADS_APP_SECRET` environment variables on the **backend**. If either is missing or unset when the backend starts, Threads will not appear in the channel list at all — you'll think the provider is broken when really the env vars never got loaded. After adding them, **restart Postiz** and confirm Threads is offered in the Add Channel dialog before troubleshooting further.
</Warning>

<Steps>
  <Step title="Create an app">
    Go to Meta for Developers and [create a new app](https://developers.facebook.com/apps/creation/). Give your app a name and email.

    <img src="https://mintcdn.com/postiz/NC1G4tduhaxm8LzE/images/providers/threads/threads_app_name.png?fit=max&auto=format&n=NC1G4tduhaxm8LzE&q=85&s=daf64c01485d3cf25f6006b911a70bf3" alt="Create app" width="659" height="421" data-path="images/providers/threads/threads_app_name.png" />
  </Step>

  <Step title="Request access to Threads">
    Select *Access the Threads API*.

    <img src="https://mintcdn.com/postiz/NC1G4tduhaxm8LzE/images/providers/threads/threads_request_api.png?fit=max&auto=format&n=NC1G4tduhaxm8LzE&q=85&s=782d7249c2595e33a7a65c06865725c9" alt="Request access" width="992" height="498" data-path="images/providers/threads/threads_request_api.png" />
  </Step>

  <Step title="Add business details, or skip">
    <img src="https://mintcdn.com/postiz/NC1G4tduhaxm8LzE/images/providers/threads/threads_business.png?fit=max&auto=format&n=NC1G4tduhaxm8LzE&q=85&s=236cc81a67ee677870a627ec54970ea4" alt="Add business details" width="743" height="337" data-path="images/providers/threads/threads_business.png" />

    If you're unable to skip or move to the next step, and get a message saying "There are no business portfolios available to connect to this app", go to your [Meta Business Suite Settings](https://business.facebook.com/latest/settings/business_users) and make sure you've enabled Two-Factor Authentication (2FA) for your account.
  </Step>

  <Step title="Finish creating the app">
    You should not have any extra requirements to publish and maintain access.
  </Step>

  <Step title="Configure API access">
    On the app dashboard, Select "Access the Threads API" to begin customizing the API access.

    Add the "threads\_content\_publish" and "threads\_basic" (automatically selected) to your app.

    <img src="https://mintcdn.com/postiz/NC1G4tduhaxm8LzE/images/providers/threads/threads_access.png?fit=max&auto=format&n=NC1G4tduhaxm8LzE&q=85&s=b708b39373dec8bb6eb5321ea3b0ec0d" alt="Configure API access" width="996" height="314" data-path="images/providers/threads/threads_access.png" />
  </Step>

  <Step title="Set threads API settings">
    * Click the "Settings" tab. Copy your "Threads App ID", and set the postiz environment variables `THREADS_APP_ID` to this value.
    * Click the "Show" button next to the Threads App Secret, and set the postiz environment variable `THREADS_APP_SECRET` to this value. Note that the next box is quite small, make sure you scroll across the copy the full value. It should be 32 characters long.

    <Snippet file="oauth2redirect.mdx" />

    **Your Threads OAuth2 Redirect URI:**

    * Production: `https://your-postiz-domain.com/integrations/social/threads`
    * Local development: `http://localhost:4200/integrations/social/threads`
    * Docker: `http://localhost:5000/integrations/social/threads`

    <Note>
      You have to "click" the URL to make it active, otherwise the form will not save.
      You can use the same value for the **Uninstall Callback URL** and **Delete Callback URL**, but note that Postiz does not support either at this time. The form will not save unless you enter something.
    </Note>

    <img src="https://mintcdn.com/postiz/NC1G4tduhaxm8LzE/images/providers/threads/threads_api_settings.png?fit=max&auto=format&n=NC1G4tduhaxm8LzE&q=85&s=17fb560ad8fb4a7ddfdf0518dee64b97" alt="Set threads API settings" width="1022" height="533" data-path="images/providers/threads/threads_api_settings.png" />

    Go back to the 'Dashboard' view of the Facebook developers portal and click "Finish customization". Make sure you clicked through the setup wizard, and select "Yes I'm finished" to complete the setup. The API may not work until you've done this.
  </Step>

  <Step title="Restart Postiz">
    Stop Postiz if it is running, and then start it again to pick up the new environment variables.

    You should not try to add a Threads account to Postiz at this time.
  </Step>

  <Step title="Add the Threads account as a tester">
    * In the sidebar go to "App roles" -> "roles".
    * Select the "Testers" tab. Click "Add People".
    * Under *Additional Roles for this App*, select *Threads Tester*.
    * Enter usernames of the threads users you want to test the app. Probably your own username. Note that this is probably different from your Meta developers account which is tied to Facebook.
  </Step>

  <Step title="Allow the app on your threads account">
    * On threads.com, open your [account settings](https://www.threads.net/settings/account);
    * Open [Website permissions](https://www.threads.com/settings/website_permissions), and switch to the "Invites" tab;
    * If all has gone well, you should have a pending invite. Accept that invite.

          <img src="https://mintcdn.com/postiz/NC1G4tduhaxm8LzE/images/providers/threads/threads_invite.png?fit=max&auto=format&n=NC1G4tduhaxm8LzE&q=85&s=1e77e4f0b5aa7f3d842690f421547741" alt="Threads invite" width="736" height="446" data-path="images/providers/threads/threads_invite.png" />
  </Step>

  <Step title="Start testing">
    * Go back to the Meta developers portal, and in the sidebar, click *Testing*, and then open the *Open Graph API Explorer*.

    * In the header, dropdown the API selector and change it to threads.net v1.

          <img src="https://mintcdn.com/postiz/NC1G4tduhaxm8LzE/images/providers/threads/threads_api_version.png?fit=max&auto=format&n=NC1G4tduhaxm8LzE&q=85&s=f3df813f870c12aa20b5aa29f81b0c52" alt="API Version" width="598" height="199" data-path="images/providers/threads/threads_api_version.png" />

    * In the right sidebar, under *Access Token*, click *Generate Threads Access Token*. This will open a new window where you can select the Threads account you want to test with - it should be an account that accepted the earlier invite. If everything has worked successfully you should be provided with a very long alphanumeric access token - you do not need to do anything with this, but it proves things are working correctly.
  </Step>

  <Step title="Good luck!">
    At this stage things should be working correctly, try a test post from Postiz to confirm.

    This is a complex integration, and it may take some time to get it right. If you have any issues, please reach out to us on the Postiz Discord.
  </Step>
</Steps>
