๐Ÿ“– Documentation Last updated: March 2026

Platform Setup Guide

Step-by-step instructions to connect your advertising accounts to RevHapi. Follow these guides to start tracking your revenue across all platforms.

๐ŸŽฏ

Overview

RevHapi connects to your advertising platforms via their official APIs to fetch revenue and performance data. Each platform requires different credentials and setup steps. This guide walks you through the process for each platform.

โšก

Quick Start

Before connecting any platform, make sure you have:

โœ… Requirements

  • โœ“ A RevHapi account (sign up at app.revhapi.com)
  • โœ“ Admin access to your advertising accounts
  • โœ“ For Google platforms: A Google account with access to Google Cloud Console
  • โœ“ For Meta: A Facebook Business account with ad account access
๐Ÿ’ก
Tip: Use the same Google account

For Google platforms (Ad Manager, AdSense, Google Ads), use the same Google account that has access to your advertising accounts. This simplifies the setup process.

๐Ÿ“˜

Meta Ads (Facebook/Instagram)

~20 min

Meta Ads requires creating a Facebook App with Marketing API access. This gives you a long-lived access token to fetch ad spend data.

๐Ÿ“‹ What you'll need

  • โœ“ Facebook account with admin access to your ad accounts
  • โœ“ A Facebook Business account (required for Marketing API)
  • โœ“ Your ad accounts must be linked to a Business portfolio
โš ๏ธ
Personal Ad Accounts

If you have a personal ad account (not linked to a Business), you'll need to create a Business portfolio first and move your ad account into it. Go to business.facebook.com to set this up.

Setup Steps

Create a Facebook App

Go to Meta for Developers:

  • Click Create App
  • Select Other as the use case
  • Select Business as the app type
  • Name your app (e.g., "RevHapi Integration")
  • Select your Business portfolio
  • Click Create App

Add the Marketing API

Once your app is created:

  • In your app dashboard, scroll to Add products to your app
  • Find Marketing API and click Set up
  • This adds the Marketing API product to your app

Add Your Business to the App

Link your Business portfolio containing your ad accounts:

  • Go to App Settings โ†’ Business
  • Click Add Business Portfolio
  • Select the Business that contains your ad accounts
  • Grant the required permissions

Add Privacy Policy & Terms URLs

Required before you can generate tokens:

  • Go to App Settings โ†’ Basic
  • Add a Privacy Policy URL (can be your company's privacy policy)
  • Add a Terms of Service URL (optional but recommended)
  • Click Save Changes
๐Ÿ’ก
Don't have these pages?

You can use any valid URL for now, such as a Google Doc or your company website's privacy page.

Generate Your Access Token

Now create the token that RevHapi will use:

  • Go to Marketing API โ†’ Tools tab
  • Under Get Access Token, select these permissions:
    • โœ… ads_read โ€“ Read ad account data
    • โœ… ads_management โ€“ Required for some metrics
    • โœ… read_insights โ€“ Access performance data
  • Click Generate Token
  • Copy the generated access token
โš ๏ธ
Token Expiration

This token expires in ~60 days. RevHapi will notify you when it needs renewal. For a never-expiring token, you can extend it to a System User token (advanced).

Find Your Ad Account ID

You'll need your ad account ID(s):

Connect in RevHapi

Add your credentials to RevHapi:

  • Go to RevHapi โ†’ Meta Ads
  • Paste your Access Token
  • Enter your Ad Account ID
  • Give the account a name for easy identification
  • Click Connect

Repeat for each ad account you want to track.

โœ…
You're connected!

RevHapi will now fetch your Meta Ads spend data. Remember to renew your token before it expires!

๐Ÿ’ฐ

Google AdSense

~2 min

AdSense uses OAuth sign-in โ€“ the easiest setup! Just click connect and authorize with your Google account.

๐Ÿ“‹ What you'll need

  • โœ“ A Google account with an active AdSense account
  • โœ“ Your AdSense account must be approved and receiving traffic

Setup Steps

Go to RevHapi AdSense Settings

Navigate to RevHapi โ†’ AdSense and click the Connect AdSense button.

Sign In with Google

You'll be redirected to Google. Sign in with the Google account that owns your AdSense account.

  • Review the permissions requested
  • Click Allow to grant RevHapi read-only access

Select Your AdSense Account

If you have multiple AdSense accounts, select the one you want to connect. RevHapi will automatically detect your Publisher ID.

โœ…
That's it!

AdSense is now connected. RevHapi will fetch your earnings data automatically.

๐Ÿ”ง

Troubleshooting

Running into issues? Here are solutions to common problems:

Google Ad Manager

Make sure you've enabled the Google Ad Manager API in Google Cloud Console. Go to APIs & Services โ†’ Library, search for "Google Ad Manager API", and click Enable.

The service account hasn't been added to Ad Manager. Go to Admin โ†’ Users โ†’ Service account users in Ad Manager and add your service account email with at least Viewer permissions.

Make sure you're copying the entire JSON file contents, including the curly braces. Open the downloaded .json file in a text editor, select all (Ctrl+A), copy, and paste.

Meta Ads

Meta access tokens expire after ~60 days. Go back to your Meta App โ†’ Marketing API โ†’ Tools, generate a new token with the same permissions, and update it in RevHapi.

Make sure the ad account is linked to the Business portfolio that's connected to your app. Go to Business Settings โ†’ Ad Accounts to verify.

You need a Privacy Policy URL set in your app. Go to App Settings โ†’ Basic and add a Privacy Policy URL (any valid URL works).

AdSense / Google Ads

Check if your browser is blocking popups. Allow popups from app.revhapi.com in your browser settings.

Make sure you're signing in with the Google account that actually has AdSense/Google Ads access. Try signing out of all Google accounts first, then connect again.

โ“

Frequently Asked Questions

Yes. RevHapi uses industry-standard encryption for all stored credentials (AES-256). API tokens are encrypted at rest and we only request read-only permissions where possible. We never store your actual advertising content โ€“ only aggregated performance metrics.

RevHapi automatically syncs data every hour for all connected platforms. You can also manually refresh at any time from the Dashboard.

Yes! You can connect multiple ad accounts from the same or different platforms. This is great for agencies managing multiple clients or businesses with separate ad accounts.

RevHapi only requests read-only access to your advertising data. We can view your revenue, spend, and performance metrics, but we cannot modify your campaigns, budgets, or settings.

Go to the platform's settings page in RevHapi and click "Disconnect". Your historical data will be retained, but no new data will be fetched. You can also revoke access from the platform's side (e.g., in Google Account permissions).

Contact our support team at support@revhapi.com or use the Support page in the app. We typically respond within 24 hours.