# Connect your X account

> Configure the developer app, authorize the right account and test access.

Canonical: https://ownpost.fyi/docs/guides/connect-x

## Before you begin

Your own X developer app and suitable API access. Your administrator must configure a base64-encoded 32-byte X_CREDENTIAL_KEY on the server.

## Steps

1. Check the active account in the workspace's account switcher. In your X developer app, enable OAuth 2.0 user authentication and configure the app type/permissions needed for that account's publishing workflow.

2. Open Settings → Connections → X publishing and choose Add developer app details, or Edit developer app details for a saved connection. Copy the exact callback URL shown in that editor: your workspace origin followed by /api/x/callback. Register it in the developer app.

3. Enter the developer app's client ID and, when required for its app type, client secret in the same editor. Save those app details.

4. Choose Connect X. Sign in to X and authorize the intended account, then return to the workspace.

5. Check the displayed username, account ID and granted scopes. Choose Test connection.

6. Under Post publishing, choose Edit publishing settings. Enable Publish through X when you want approved API delivery, leave Pause automation off to allow delivery, then choose Save automation settings. Each post still needs your explicit approval.

## A practical example

If you have Personal and Studio profiles, switch to Studio before connecting its X account. Verify the returned @username in Settings before approving a Studio post.

## Check the result

The workspace identifies the intended X account and reports the connection test result.

## Troubleshooting

A callback mismatch must be corrected on both sides. Missing server encryption configuration needs your administrator. API access or scope errors must be resolved in your X developer account; reconnect after changing authorization.

## Keep going

[Add and switch between X accounts](https://ownpost.fyi/docs/guides/multiple-accounts)

[Approve and publish through the API](https://ownpost.fyi/docs/guides/api-publish)

[Resolve held, partial or uncertain delivery](https://ownpost.fyi/docs/guides/delivery-recovery)

[X OAuth setup documentation](https://docs.x.com/fundamentals/authentication/oauth-2-0/authorization-code)

## Related

- [Previous: Deployment walkthrough](https://ownpost.fyi/docs/guides/deploy)
- [Next: Set up AI writing](https://ownpost.fyi/docs/guides/ai-writing)
