Wednesday, August 14, 2024

Digest for adsense-api@googlegroups.com - 2 updates in 1 topic

Jason <qq286027564@gmail.com>: Aug 09 03:05AM -0700

Hi Andrew,
when I use $report = $service->accounts_reports->*generate*($account,
$optParams); I can get result correctly. but when I change it to $report =
$service->accounts_reports->*generateCsv*($account, $optParams); and then
$report->getData(), it always show NULL
 
Thank you and Best regards
Jason
 
 
 
 
On Thursday, August 8, 2024 at 5:12:57 PM UTC+8 Ad Sense API wrote:
 
Ad Sense API <adsenseapi@forumsupport.google>: Aug 13 09:38AM

Hi Jason,
 
I've looked into this in more detail, and unfortunately there is an issue with PHP support for the reportCsv method. This is primarily because the CSV report response (by design) is not in JSON format. The regular report method should work fine with the PHP client library however.
 
Regards,
Andrew (AdSense API team)
ref:!00D1U01174p.!5004Q02vEfLJ:ref
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to adsense-api+unsubscribe@googlegroups.com.

Friday, August 9, 2024

Digest for adsense-api@googlegroups.com - 2 updates in 1 topic

Jason <qq286027564@gmail.com>: Aug 07 03:03PM -0700

Hi Andrew,
thank you for the answer.
https://github.com/googleads/googleads-adsense-examples/tree/HEAD/v2/php/examples/GenerateReport.php has
only an example of generate method, but no generateCsv method
I tried $report = $service->accounts_reports->generateCsv($account,
$optParams); its returned value is HttpBody and I have no idea how to get
data from it.
 
 
 
 
On Thursday, August 8, 2024 at 1:42:39 AM UTC+8 Ad Sense API wrote:
 
Ad Sense API <adsenseapi@forumsupport.google>: Aug 08 09:12AM

Hi Jason,
 
It looks like you will be getting back the https://github.com/googleapis/google-api-php-client-services/blob/main/src/Adsense/HttpBody.php type, and calling getData() should get you the contents. Alternatively if you can get the generateCsv output in plain text, the CSV report appears after the http headers, so it should just be a case of ignoring the text until it gets to the line that includes the report column names.
 
I hope that helps.
Regards,
Andrew (AdSense API team)
ref:!00D1U01174p.!5004Q02vEfLJ:ref
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to adsense-api+unsubscribe@googlegroups.com.

Thursday, August 8, 2024

Digest for adsense-api@googlegroups.com - 2 updates in 1 topic

Jason <qq286027564@gmail.com>: Aug 07 02:27AM -0700

is there an example of how to use *generateCsv* method and handle the
returned data in php?
$report = $service->accounts_reports->generate($account, $optParams);
 
thank you very much.
Ad Sense API <adsenseapi@forumsupport.google>: Aug 07 05:42PM

Hi Jason,
 
Thanks for your question. We have some example php code for report generation at https://github.com/googleads/googleads-adsense-examples/tree/HEAD/v2/php/examples/GenerateReport.php (accessed via https://developers.google.com/adsense/management/libraries). Hopefully that is a good starting point for what you are trying to do.
 
Regards,
Andrew (AdSense API team)
ref:!00D1U01174p.!5004Q02vEfLJ:ref
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to adsense-api+unsubscribe@googlegroups.com.

Wednesday, August 7, 2024

Digest for adsense-api@googlegroups.com - 2 updates in 1 topic

Unibots GA <somounibots@gmail.com>: Aug 06 05:39AM -0700

Hi Team,
 
I am using the AdSense Management API to get a list of all the channels,
but I am unable to find any reference to get the list of all the style IDs
and names for the respective account.
 
Thank you,
Bhupender Singh
Ad Sense API <adsenseapi@forumsupport.google>: Aug 06 03:34PM

Hi Bhupender,
 
Thanks for your question. The AdSense Management API doesn't support search styles directly, so you won't be able to get a full list of style IDs and names. They are available as reporting dimensions however (CUSTOM_SEARCH_STYLE_ID and CUSTOM_SEARCH_STYLE_NAME - see https://developers.google.com/adsense/management/reference/rest/v2/Dimension), so if there is data in the reports for the styles, they should be returned that way.
 
Regards,
Andrew (AdSense API team)
ref:!00D1U01174p.!5004Q02vEcat:ref
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to adsense-api+unsubscribe@googlegroups.com.

Saturday, August 3, 2024

Digest for adsense-api@googlegroups.com - 1 update in 1 topic

Jessyca Moraes <jessyca.moraes@alright.com.br>: Aug 02 05:17AM -0700

Hello!
 
Is it possible to get payment information of the account through the
AdSense API? Information such as: Payments account ID, Payments account
nickname, Payments profile ID, Country/Region, Account type, Name, Address,
Phone number, Document language preference.
 
Thanks in advance!
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to adsense-api+unsubscribe@googlegroups.com.

Thursday, August 1, 2024

Digest for adsense-api@googlegroups.com - 1 update in 1 topic

Adrien Hingert <ahingert@gmail.com>: Jul 30 11:05PM -0700

Thank you, Andrew.
I'll keep combing through my code, then.
 
Adrien
 
On Tuesday 30 July 2024 at 16:52:58 UTC+2 Ad Sense API wrote:
 
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to adsense-api+unsubscribe@googlegroups.com.