Getting statistics from Google DV360 campaign via API - google-api

I'm trying to use google API to get reports on campaigns/ads that are created in Display & Video 360.
Fetching information about them requires https://www.googleapis.com/auth/display-video scope for my access token. However, it looks like getting reports is only possible through creating/running queries, which are part of Double Click Bid Manager, so I need to additionally enable this API and request https://www.googleapis.com/auth/doubleclickbidmanager scope.
Is my understanding correct? It seems strange because I can view reports in DV360 web interface.

Related

How to get the get API path and parameters of Google play developer API?

I have added a non-renewable subscription for one of my projects. We also started implementing the Google play developer API to get the subscription latest status from the Play Store. For that we have done the below steps as per this blog:
Linked the developer account to a new Google Cloud Project.
Enabled the Google Play Developer API for the Google Cloud Project.
Created a service account and created a key for the service account.
I have below clarifications related to this implementation:
I tried to Grant Access for the following permissions: But the corresponding checkmark is not clickable.
View financial data, orders, and cancellation survey responses
Manage orders and subscriptions
The 3rd step as per the blog is to Authorize an API key, but I didn't get a clear idea of that.
We are going to implement this API on the back end side as a corn job, do we need to generate a JWT token for accessing this API? Is this possible to call without a Token? I found 2 types of implementations from this blog, which one is easy and secure?
"Your application can complete these tasks either by using the Google APIs client library for your language or by directly interacting with the OAuth 2.0 system using HTTP."
From where we get the get API path and other details. I found a similar get API from AppStore like this. Is the play store providing a similar kind of get API?
We need the latest purchase status API and for that what parameters do we need to pass?

How to access user Google Fit data from backend

I write backend ASP .NET Core API and I need to read user Google Fit data.
I created an Android app that gets the server auth code and sends it to backend. As far as I understand, I need to get user token and then use it to access Google Fit. I tried to find libraries for it and failed. I also tried to get user token using Postman and got the following error:
{
"error": "invalid_grant",
"error_description": "Bad Request"
}
Am I doing something wrong?
You may refer with this thread: Using google fit api from a backend server.
To access from a back end server you will need to use the Rest API's There is documentation at developers.google.com/fit. You should be aware that the Google servers and the Android device are synced irregularly so data on the device may not be visible for hours or even days.
You may also check this link on how to read user's Google Fit data via REST API.
There is a mechanism for Android apps to obtain offline access for web back-ends highlighted in the CrossClientAuth guide from your question. With offline access, you can theoretically serve or store that data in any way that the user has consented to. Any access controls of that data to another person is something that you'd have to handle on your own.

Oauth 2.0 | Google Documentation for operations

I am not able to find google documentation where all valid possible operation url per scope are mentioned?
I am consuming google API, using oauth 2.0 by Httpclient ie without using google api client jar or dependency.
To fetch Users profile I set emailId profile in scope and made a get request to https://www.googleapis.com/oauth2/v1/userinfo?access_token=XXX using HttpClient,this is working.
There is a page where all scopes are mentioned but unable to find list of possible operations for particular scope.Please help me into this.Thanks!
On the page describing scopes, if you click on the title of a scope section, say the Calendar API, you are brought to that API's home page. From here you can got to the guides tab and follow the quick start for the language of your choice (which Google encourages since their client libraries tend to do a lot of the work for you), or go to the reference tab and view the available endpoints. From here you can send your access token as described here
As far as which scope applies to which endpoint, I assume view and read only scopes will probably only work for GET requests, while other manage scopes will probably encapsulate the other endpoints. Apart from that assumption, I don't know if Google has the scope exactly lined up with the endpoints they are valid for.

How to get "Apps usage activity" report via Google report api using program(c# nodejs)

How to get "Apps usage activity" report via Google report api
"Apps usage activity" is under Admin console\reports
You can follow first this documentation to know how to set up your application's authorization. The Authorize Requests documentation shows you how to set up your client's authorization using the OAuth 2.0 protocol. The request must be authorized by an authenticated user who has access to that data when your application requests private data.
You can also check these SO question and tutorial about Google Analytics Core Reporting API with C#. It allows you to query report data. Each query requires a view (profile) ID, a start and end date, and at least one metric. You may also supply additional query parameters such as dimensions, filters, and segments to refine your query.

Use Application Insights to view all REST API requests per user

We are developing a WebApi2 application. Users can use the REST API using their specific API key. I am investigating how to setup Application Insights to be able to see the usage of the REST API endpoints per user.
I have been experimenting with using telemetryclient.TrackPageview(endpoint-ID) and telemetryclient.TrackEvent(endpoint-ID), but I am not sure if this is the right way to go. And how should I pass the user-ID (API-key) in the tracking call? As telemetryclient.Context.User.Id? Or using properties or some other way? I would like to be able to use the user-ID to aggregate/segment the pageviews/events that were registered for that particular user. Any ideas are welcome!
I'd suggest using the built in properties, like context.user.id whenever possible, and then custom properties after that.
Currently in the portal, from the search view you can then find an item for any user, then use the "related items" to view "all telemetry for this user" to see all of the items.
Then can use the App Analytics portal to do queries (click the "analytics" button toolbar in the overview blade for your resource azure portal to go to the AA site for that resource), and that service lets you write much richer queries.
in those queries, it's easiest to group/filter on the "built in" properties, for custom properties you have to write a little bit more complicated queries to parse the values out of custom code.

Resources