AdMob Reporting API with Google Service Account

1,505 views
Skip to first unread message

Bahattin Cinic

unread,
Feb 11, 2021, 8:33:05 AM2/11/21
to AdMob API Developer Forum
Hi,

We would like to fetch our reporting data from AdMob Reporting API. 
We do not have a user interface. That's why we need to use a Google service account. But I get an error when I try to get a report with a service account credential.

Example API request is below;

carbon.png

carbon (1).png

When I have investigated the problem, I realized that it doesn't work with the service account. Because I was able to get the report with OAuth desktop App. 

As I said before we don't have a customer interface to get relevant permission from users.
- How can I fetch reporting data in the background task?
- Is it possible to generate infinite (never expire) access tokens?

Thanks.

AdMob API Forum Advisor

unread,
Feb 16, 2021, 3:10:14 PM2/16/21
to bahatti...@coda.xyz, google-admob-api...@googlegroups.com
Hello there,

Thank you for reaching to the forum. Currently, we do not support service accounts, but will take your feedback into consideration into our prioritization planning.

In regards to the 401 UNAUTHENTICATED error, please see our Common Errors page. Please see the responses to your other questions below.

1. How can I fetch reporting data in the background task?

Based on your implementation, you can call the AdMob API for reporting data at a recurring time interval, however, please follow our quota limits and guidance on getting report data efficiently.

2. Is it possible to generate infinite (never expire) access tokens?

It is not possible to generate infinite access tokens. However, a refresh token allows your application to obtain new access tokens, however, they may expire in the following circumstances. The AdMob API's OAuth Playground guide instructs users on how to retrieve their credentials and tokens.

Please do not hesitate to reach out if you have any additional questions.

Google Logo
Amira Badreldin
AdMob API Team

Help us improve the AdMob API,
please
share your feedback!
 


ref:_00D1U1174p._5004Q2CQ0x4:ref

Anh Trung

unread,
Jul 16, 2022, 11:07:20 AM7/16/22
to AdMob API Developer Forum

Hi,
Your answer is long time ago
I want to know at the moment, does Admob API support Service Account Authentication?

Thanks!

AdMob API Forum Support

unread,
Jul 18, 2022, 7:35:42 PM7/18/22
to anhtru...@gmail.com, google-admob-api...@googlegroups.com
Hello,

Thank you for reaching to the forum. Currently, we do not support service accounts.

All the best,
Google Logo
Amira
AdMob API Team
 


ref:_00D1U1174p._5004Q2CQ0x4:ref
Message has been deleted

정우철

unread,
Sep 5, 2023, 8:47:10 PM9/5/23
to AdMob API Developer Forum

Hello,
Your answer is long time ago
I want to know at the moment, does Admob API support Service Account Authentication?

Thanks!
Hello,

Lin Yang

unread,
Sep 11, 2023, 6:55:53 PM9/11/23
to AdMob API Developer Forum
Unfortunately, we don't support service account authentication in general at this point.
Reply all
Reply to author
Forward
0 new messages