Get Started

Quickstart

Go from zero to your first authenticated API call in about five minutes. Everything here runs against the free sandbox — no credit card, no production data.

Before you begin
You’ll need a WhiteBooks developer account. Sign up at accounts.whitebooks.in and choose Developer to receive your sandbox credentials.

Make your first request

1
Get your sandbox credentials

After signing up, open your dashboard and copy your x-api-key, client_id, and client_secret. These identify your application against the sandbox.

2
Note the base URL

All sandbox requests go to https://apisandbox.whitebooks.in. Endpoints are mounted under their respective service routes (such as /public/search or /einvoice/...). Switch to https://api.whitebooks.in when you go live.

3
Exchange your keys for an access token

WhiteBooks uses OAuth 2.0. Call the authentication endpoint to receive a short-lived bearer token (valid for one hour).

1curl -X GET "https://apisandbox.whitebooks.in/authentication/authtoken" \
2 -H "x-api-key: YOUR_API_KEY" \
3 -H "client_id: YOUR_CLIENT_ID" \
4 -H "client_secret: YOUR_CLIENT_SECRET"

The response contains the token you’ll attach to every subsequent request:

1{
2 "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6...",
3 "token_type": "Bearer",
4 "expires_in": 3600
5}
4
Make an authenticated call

Send the token as a Bearer header. This example validates a GSTIN using the GST API:

1curl -X GET \
2 "https://apisandbox.whitebooks.in/public/search?gstin=29AAACW1234A1Z5" \
3 -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
4 -H "x-api-key: YOUR_API_KEY"
5
Go to production

When your integration is ready, swap the base URL to https://api.whitebooks.in and use your production credentials. Tokens, headers, and payloads stay identical.

That’s it
You’ve made your first authenticated request. Next, read how authentication and token refresh work in detail, or jump into the full API Reference.

Environments

EnvironmentBase URLNotes
Sandboxhttps://apisandbox.whitebooks.inFree. Test data only. 60 requests/min.
Productionhttps://api.whitebooks.inLive GSTN/NIC submissions. Rate limit by plan.