Intercepting the OAuth Flow

Fully control the OAuth flow with White Label projects.

When building a White Label project with Post for Me, you may want to intercept the OAuth authentication process so users hit your application before being sent to our servers. By using the redirect_url_override parameter, you can gain complete control over the authorization flow and handle account connections exactly how your architecture requires.

Here is a breakdown of how to use redirect overrides and the two paths you can take to complete the connection.

The Redirect URI Override

The Redirect URI Override is a parameter passed when generating an authentication URL that replaces the default Post for Me redirect URI.

How it works

When making a POST request to the /v1/social-accounts/auth-url endpoint, you pass your custom URL as the redirect_url_override. After the user authorizes your app on the social platform, they are redirected to this custom URL instead of Post for Me's servers.

Requirements

Because you are modifying the OAuth flow, this custom domain must be explicitly listed in the authorized redirect domains (or callback URLs) within the native developer portal of the specific social platform (e.g., your Meta App dashboard or Google Cloud Console).

Note: This override feature is exclusive to projects using your own credentials and will not work if you are using our system credentials (Quickstart).

Manual Account Creation

Manual Account Creation is designed for developers who want to manage the OAuth token exchange themselves.

How it works

Once the social platform redirects the user to your custom URI, your server extracts the authorization code from the URL parameters. You then independently exchange this code for an access and refresh token directly with the social network.

The Workflow

After successfully retrieving the tokens, you make a POST request to the Post for Me /v1/social-accounts endpoint. You pass the newly generated tokens and user details to formally create the connection in our system, allowing you to handle the connection entirely server-side.

Forwarded Account Connection

Forwarded Account Connection allows you to intercept the user journey for your own tracking or onboarding steps while still letting Post for Me handle the complex token exchange.

How it works

After the user hits your custom redirect URI, your application performs its necessary internal tasks. Then, you simply forward the entire request (including the authorization code parameters) to the standard Post for Me redirect URI.

The Workflow

We will process the forwarded request, seamlessly handle the token exchange, securely store the credentials, and finally redirect the user back to your global Project Callback URL upon completion.