Custom app connections are available on the Team plan. See White-label Connections for the overview.
Quick Connect vs Custom App
What You Need
Four values, because the X Ads API uses OAuth 1.0a rather than OAuth 2.0. The API key pair identifies your app and the access token pair identifies the user, and every request is signed with a combination of the two.Already have your own authorization flow? If your systems already hold an access token pair issued by your app, skip to Connect to Markifact.
Setting Up Your Custom X Ads App
1
Create the App
- Open the X developer portal and create a project and an app inside it
- Enter the app name. This is the branding users see when they authorize
- Under User authentication settings, turn on OAuth 1.0a, set App permissions to Read and write, and enter a callback URL you control (for example
https://www.youragency.com/x-callback) and your website URL
2
Request Ads API Access
The Ads API is not available to every app. Apply for X Ads API access for your developer account and wait for approval. Agencies that already run their own integrations will have this in place; until it is granted, the accounts endpoint returns authorization errors.
3
Copy the API Key Pair
Open the app’s Keys and tokens tab and copy the API Key and API Key Secret (shown once when generated; regenerate if you lost them).
4
Generate the Access Token Pair
On the same tab, under Access Token and Secret, click Generate. The tokens are created for the X account you are signed in as, so sign in as the user who has access to the ad accounts you want to manage.Copy the Access Token and Access Token Secret. Make sure the permissions shown next to them say Read and Write; if they say Read only, fix the app permissions first and regenerate.
Important: Keep these values secure. Anyone holding all four can act on every ad account the user can reach.
5
Connect to Markifact
- In Markifact, go to the Connections page
- Click Connect on X Ads
- Select the Custom App (White-label) tab
- Enter a Connection Name (for example “Acme Agency X Ads”)
- Paste your API Key, API Key Secret, Access Token, and Access Token Secret
- Click Verify & Connect
Managing a client’s ad account rather than your own? Ask the client to add your X user to their ad account in X Ads Manager, then generate the access token pair as that user. The tokens carry whatever access that user has.
Selecting Your Connection
Custom app connections appear under the name you chose, with a Custom app badge on the Connections page. Select them in X Ads nodes, agents, and MCP exactly like any other X Ads connection.Rotating or Replacing the Tokens
Add the connection again with the same connection name and the new values. Markifact replaces the stored credentials in place, so workflows and agents bound to the connection keep working.Troubleshooting
X rejected the credentials (401)
X rejected the credentials (401)
The four values do not belong together, or one was mistyped. The access token must have been generated under the same API key you pasted. Regenerate the access token pair on the app’s Keys and tokens tab and paste all four again.
X refused access (403)
X refused access (403)
Either your developer account has no Ads API access yet, or the access token was generated while the app permissions were Read only. Fix the permissions under User authentication settings, regenerate the token pair (changing permissions does not update existing tokens), and try again.
These tokens cannot see any ad accounts
These tokens cannot see any ad accounts
The X user behind the access token has no access to any ad account. Add them in X Ads Manager under account access, then regenerate the tokens.
X is rate limiting this token
X is rate limiting this token
The accounts endpoint allows 5 requests per 15 minutes per token, which the connection check uses once. Wait a few minutes and try again.
Summary
Related
White-label Connections
Overview of custom app connections across channels
Get Report
Pull X Ads performance data

