When I log into Yahoo Gemini Publisher dashboard (located https://gemini.yahoo.com/publisher), I can see reports for the Publisher IDs I have configured. I am now trying to get this same data from the Gemini REST APIs, but am running into some confusion and errors.
According to https://developer.yahoo.com/gemini-publishers/docs/gemini-publisher-reporting.html I need to get an OAuth2 access token (which I can do successfully through https://api.login.yahoo.com/oauth2/request_auth?client_id=GEMINI_CONSUMER_KEY&redirect_uri=MY_URL&response_type=token&language=en-us browser redirect) and make a call to https://api.admanager.yahoo.com/v1/rest/reports/publisher/ to get the reports. However when I do, I get a cryptic response:
curl --request POST \
--url http://api.admanager.yahoo.com/v1/rest/reports/publisher/ \
--header 'accept: application/json' \
--header 'authorization: Bearer [omitted]' \
--header 'content-type: application/json' \
--data '{ ... cube JSON stuff ... }'
{"error":{"lang":"en-US","description":"Please provide valid credentials. OAuth oauth_problem=\"additional_authorization_required\", realm=\"yahooapis.com\""}}
The OAuth token was granted with access to the Gemini API. I have tried getting the OAuth token through both the Explicit and Implicit methods, with the same result. Thinking that it may be a access issue, I increased the permission granted to the other APIs as well (Profile, Contacts, etc) with no change.
I noticed there are a separated set of Gemini APIs listed on https://developer.yahoo.com/gemini/. These APIs are located at https://api.gemini.yahoo.com/v2/rest/reports/custom/ and when I POST to them it accepts my OAuth token, however the "cubes" for these APIs require an "Advertiser ID" which I am not sure where to get or if I am am using the right API.
{
"errors": [
{
"errIndex": -1,
"code": "E40000_INVALID_INPUT",
"message": "Entity (publisher or advertiser id) not available",
"description": ""
}
],
"response": { ... }
}
The message would seem to indicate I could pass in a Publisher ID, however when I include that in the "filter" it does not work.
When I try to call https://api.gemini.yahoo.com/v2/rest/advertiser/ I receive no advertisers back.
Which API should I be using? If it is https://api.admanager.yahoo.com/v1/rest/reports/publisher/ then am I omitting some required request data or am I getting the token wrong? If I am supposed to use https://api.gemini.yahoo.com/v2/rest/reports/custom/ then how do I get the publisher data (or my "Advertiser ID")?
Apparently Yahoo has deprecated the Gemini publishing APIs and moved this functionality to Flurry (whose APIs require different authentication). https://developer.yahoo.com/flurry/docs/api/code/publishing/