Authentication
For this we will send a simple post request via curl.
curl -X POST https://api.pontiac.media/auth -d ‘{“auth”:{“userName”:”user1″, “password”:”myPassword”}}’
Response:
The token received in the field authToken is to be passed in on all subsequent requests as a header called “auth”.
For example, the following is a get request for an existing advertiser:
curl -X GET -H ‘auth: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzZWF0SWQiOjI3MDIsInVzZXJJZCI6MzU1LCJleHBpcmVzIjoiMjAyMC0wOC0SDsawMjo1NToyNyJ9.d6gUDLA_Yx_Em5REoathACFMPcfv1TgL8B87P19q7yA’ ‘https://api.pontiac.media/pontiac/advertiser?advertiser-id=1234’
Response: