Skip to main content

OAuth 2.0 Authentication

Landing supports OAuth 2.0 authentication for secure third-party integrations. This guide will walk you through the process of setting up OAuth authentication for your application.
OAuth integration is only available for projects on a paid plan.

1. Create an OAuth Application

Contact support@landing.so to create a new OAuth application. You will receive:
  • Client ID
  • Client Secret
  • Authorized redirect URIs
You can also request PKCE (Proof Key for Code Exchange) configuration for enhanced security, which is recommended for public clients that cannot securely store a client secret.

2. Redirect Users to Landing’s Authorization Page

When a user wants to authorize your application, redirect them to Landing’s authorization URL with the correct parameters:
Required Parameters: Optional Parameters: Available Scopes:
  • project.read - Read access to projects
  • pages.read - Read access to pages
  • leads.read - Read access to leads
  • user.read - Read access to user information (default)
Example Request (Standard Flow):
Example Request (PKCE Flow):

3. Handle the Authorization Response

After the user approves your application, they will be redirected back to your specified redirect_uri with an authorization code:
Verify that the state parameter matches the one you sent in step 2 to prevent CSRF attacks.

4. Exchange Code for Access Token

Exchange the authorization code for an access token by making a POST request:
Required Parameters: Authentication Methods (One Required): The parameters should be sent as application/x-www-form-urlencoded data. Example Response:

5. Make API Requests

Use the access token to make authenticated requests to Landing’s API by including it in the Authorization header:

6. Refresh Access Token

When an access token expires, use the refresh token to obtain a new one:
Required Parameters: Optional Parameters: Example Response:

User Information

Once authenticated, you can retrieve information about the authenticated user:
Example Response:
This endpoint requires the user.read scope.