DEVELOPER · Production Integration Guide

Age verification API in three requests.

BBaton's age verification API is the simplest way to add age verification to your website or app. It does not pass the user's name or phone number — only verification values such as adult status, birth year and gender — so your service doesn't have to store real names or contact details for age checks. No setup cost, no fees.

Standard OAuth 2.0 — nothing new to learn. Authorize → token exchange → claim retrieval, using the OAuth libraries you already have, on web and app alike.

OAuth 2.03-hour setupNo setup cost · no feesWeb · App · WordPress
bbaton — quickstart · 3 requests
# 1. Send the user to the BBaton authorize page
GET https://bauth.bbaton.com/oauth/authorize
    ?client_id={CLIENT_ID}&redirect_uri={REDIRECT_URI}
    &response_type=code&scope=read_profile

# 2. Exchange the redirect code for a token
POST https://bauth.bbaton.com/oauth/token
    Authorization: Basic base64(client_id:secret_key)
    grant_type=authorization_code&code={CODE}

# 3. Fetch the claim with the token
GET https://bapi.bbaton.com/v2/user/me
    Authorization: {token_type} {access_token}

# Response — verification result, no name or phone
{ "user_id": "abc123", "adult_flag": "Y",
  "birth_year": "1990", "gender": "M",
  "income": "N/A", "student": "N/A",
  "result_code": "00", "result_message": "Success" }   // name·phone: none
01 · Start Here

Four documents,
in adoption order.

Organized in real adoption order. New here? Start at Preparation. In a hurry? Jump straight to Integration.

02 · How It Works

The entire integration is
three requests.

No changes to your auth stack. Responses carry no names or phone numbers; they include verification results such as adult status, birth year, and gender.

1

Authorize

Send the user to the BBaton authorize page. With an active session, the code returns immediately.

GET bauth.bbaton.com/oauth/authorize
2

Token

Exchange the redirect code for a token using Basic auth. Sessions last 24 hours by default.

POST bauth.bbaton.com/oauth/token
3

Verify

Fetch the result with the token. The response includes adult status, birth year, gender, and similar fields — no names or phone numbers.

GET bapi.bbaton.com/v2/user/me
✓
Redirect URL must match exactly

Most integration errors are redirect_uri mismatches. The registered value and request parameter must match to the letter.

✓
Token first, user info second

Login success alone is not the end. You can call /v2/user/me only after the code → token exchange.

✓
Secret Key stays server-side

The Secret Key is used for Basic auth at token exchange. Never expose it in front-end code or app bundles.

✓
Separate prod and staging

Confirm request IPs and Callback URLs match your environment, and validate the flow on staging first.

03 · Platforms

Three paths,
one set of credentials.

Web via OAuth directly, WordPress via plugin, apps via SDK. Every path uses the same issued credentials.

Web · Mobile Web

Direct OAuth

Standard OAuth 2.0 — use the open-source libraries you already have.

  • Node.js · Java · PHP · Python examples
  • Parameter tables · troubleshooting
Integration docs →
WordPress

Plugin install

No custom development — install the plugin and enter your settings.

  • Official WordPress.org release
  • Page targeting from admin
Plugin docs →
Android · iOS

App SDK

Add the .aar / .framework, initialize, and invoke the flow natively in-app.

  • Java · Swift example code
  • adult_flag return handling
App SDK docs →
04 · FAQ

Age verification API FAQ

Q

How much does it cost?

Free — no setup cost, no fees, no per-call charges.

Q

How long does integration take?

Three standard OAuth 2.0 requests; following the guide, about 3 hours.

Q

What data does my service receive?

A BBaton account ID (user_id), adult status (adult_flag), birth year (birth_year) and gender (gender). Income (income) and student status (student) come as N/A when empty. Name and phone number are not passed.

Q

Which environments are supported?

Web, mobile web, Android and iOS app SDKs, and a WordPress plugin.

Integrate today,
ship tomorrow.

Your Client ID and Secret Key are issued automatically on application. Stuck mid-integration? We reply within 24 hours.