Before you can begin integrating PubMatic APIs…
To start using PubMatic APIs you must first register via email. Use the following steps to register:
Select Learn More for the section below that's appropriate for your role:
Email your Publisher ID assigned by PubMatic, and the other fields requested in the body of the email to: email@example.com.
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: firstname.lastname@example.org.
Email the name of the person at PubMatic who referred you, and the other fields requested in the body of the email to: email@example.com.
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.
Follow the steps below to generate the Access Token using the Consumer Key, Consumer Secret, and PubToken included in your confirmation email from PubMatic.
Access Tokens expire 60 days from time of creation.
- Generate a base64 encode of your Consumer Key:Consumer Secret string (you can do so using, http://www.motobit.com/util/base64-decoder-encoder.asp).
For example, if your consumer key=
CANfdsfdasdfFGand consumer secret key=
XyZdfsdLRV. Your base64 encode should resemble,
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
below with your encoded Consumer Key:Consumer Secret. Replace the
<pubMaticApiKey>placeholder in the
curlcall below with the PubToken from your confirmation email.
- With every API call, set the HTTP header Authorization with the value:
$access_tokenis a placeholder for the value returned by the
curlcall you used in step b above).