Threads API
Number of APIs: 21
Welcome to the Threads API from Meta. This collection contains the Graph API requests to create, manage, and publish Threads content, programmatically. For the full Threads documentation, refer to the developers documentation.
Getting Started
Step 1 - Create a Meta App
You need to create a Meta app with the Threads use case.
Step 2 - Enable App Users To Authorize Data Access To Your App
App users must authorize data access for the app you are developing. Ensure that proper authorization protocols are implemented to comply with data privacy and security requirements. For detailed instructions and guidelines, refer to the authorization documentation.
Step 3 - Request an Access Token
API Provisioned Token
To request an access token via the API, use the requests under the Authorization folder within this collection. See the Threads User Access Tokens section in the Threads API documentation for details on authenticating your requests. Once you have an access token, you will need to manually add the access_token header to your requests with this value.
Note: You can receive an access token for your requests either by using the requests under the Authorization folder within this collection, or by using the Authorization tab above in which the token will be provisioned by Qodex.
Qodex Provisioned Token
If using the Authorization tab to receive an access token, make sure to include the following:
Grant Type must be Authorization Code
You must supply the values for your Auth URL, Access Token URL, Client ID (your Threads app's ID), Client Secret (your Threads app's secret), and Scope.
After these values are entered, you may press Get New Access Token at the bottom of the page to receive an access token. This access token will automatically be attached to your requests.
Access token debugger
You can paste any token you generate into the access token debugger to see what type of token it is and what permission you have granted to your app.
Limitations
Please be aware that certain limitations may apply to the API usage. For the most accurate and up-to-date details, we strongly recommend referring to the online documentation. Visit the developer documentation for more information.
Using Variables
When using variables in requests (see the Variables tab above), make sure to save the updated values after modifying them (e.g. with Ctrl-S / Cmd-S). The values must be saved in the Variables tab each time they are modified.
Autosaving Variables
Variable values may be auto-updated and saved after a request. For example, when a new Thread is published, the threadid_ field can be auto-updated with the new Thread ID to be used in retrieval requests.
To use this feature, make sure to set the autosavevariables variable value to true. Otherwise, variables will not be auto-updated and you will need to update them manually.
Installation
Fork this collection into Qodex to start using the Threads API.
You can generate the code for the API calls in your language by following the steps here: [
-
Post to Threads-Single Threads Posts - 1.3 Create Video Container POST {{api_host}}/me/threads?text=This is a video&media_type=VIDEO&video_url={{video_url}}&alt_text=An example video
-
Post to Threads-Single Threads Posts - 2. Publish Threads Post POST {{api_host}}/me/threads_publish?creation_id={{container_id}}
-
Post to Threads-Carousel Threads Posts - 2. Create a Carousel Container POST {{api_host}}/me/threads?media_type=CAROUSEL&children={{carousel_children_ids}}&text=This is a carousel
-
Authorization - Exchange the Code For a Token POST {{api_host}}/oauth/access_token?client_id={{app_id}}&client_secret={{app_secret}}&code={{code}}&grant_type=authorization_code&redirect_uri={{redirect_uri}}
-
Authorization - Get Long-Lived Access Token GET {{api_host}}/access_token?grant_type=th_exchange_token&client_secret={{app_secret}}
-
Post to Threads-Carousel Threads Posts - 3. Publish a Carousel Container POST {{api_host}}/me/threads_publish?creation_id={{container_id}}
-
Post to Threads-Quote Threads Posts - 1 Create Media Container POST {{api_host}}/me/threads?text=This is a quoted post&media_type=TEXT"e_post_id={{quote_post_id}}
-
Post to Threads-Quote Threads Posts - 2. Publish Threads Quote Post POST {{api_host}}/me/threads_publish?creation_id={{container_id}}
-
Post to Threads-Repost Threads Posts - Repost Threads Post POST {{api_host}}/{{thread_id}}/repost
-
Read And Manage Threads-Retrieve Threads Profiles - Get Threads User's Profile Information GET {{api_host}}/me?fields={{fields_profile}}