Page tree

Before you can begin integrating PubMatic APIs…

You must follow the instructions below to register for API access.


To start using PubMatic APIs you must first register via email. Use the following steps to register:

Step 1

Select Learn More for the section below that's appropriate for your role:


 Learn more…

Email your Publisher ID assigned by PubMatic, and the other fields requested in the body of the email to:


 Learn more…

Email your Github profile ID and LinkedIn profile ID, if you have one , along with the other fields requested in the body of the email to:


 Learn more…

Email the name of the person at PubMatic who referred you, and the other fields requested in the body of the email to:

Your registration request will be reviewed by a PubMatic API Administrator who will send a confirmation email. Use the confirmation information to complete Step 2 below.

Step 2

Follow the steps below to generate the Access Token using the Consumer KeyConsumer Secret, and PubToken included in your confirmation email from PubMatic. 

Access Tokens expire 60 days from time of creation.

  1. Generate a base64 encode of your  Consumer Key:Consumer Secret  string (you can do so using,
    For example, if your consumer key= CANfdsfdasdfFG and consumer secret key= XyZdfsdLRV. Your base64 encode should resemble, 
    CANfdsfdasdfFG:XyZdfsdLRV .
  2. Call the following HTTP URL using any suitable HTTP utility (PubMatic uses the command line tool, curl). Replace the <base64_encoded_key:secret> placeholder in the curl call 
    below with your encoded Consumer Key:Consumer Secret. Replace the <pubMaticApiKey> placeholder in the curl call below with the PubToken from your confirmation email.


    curl -H "Content-Type:application/x-www-form-urlencoded" -H "Authorization:Basic <base64_encoded_key:secret>" -X POST -d 'grant_type=password&username=<pubMaticApiKey>&password=<pubMaticApiKey>'
  3. With every API call, set the HTTP header Authorization with the value: Bearer $access_token (where $access_token is a placeholder for the value returned by the curl call you used in step b above).