Basic Get All Campaings with Laravel and Adwords API

542 views
Skip to first unread message

Mnk

unread,
Aug 2, 2018, 9:40:19 PM8/2/18
to AdWords API and Google Ads API Forum
Hi All,

First, excuse me for my english :)

I try to use a basic operation with laravel. I don't have the problem with my token because i use another option with the API and they working good.

I configure all that i need :

- adsapi_php ( with the developerToken etc)

- Controller where i call the dependency 

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Ixudra\Curl\Facades\Curl;

use App\Services\GetCampaigns;  //the script from Adwords API for get all the campaings

create the function like :

 public function montest()
 
{
 
 $result
= GetCampaigns::main();
 
//return $result;
 $data
= [
 
'monitor'=> $result
 
];
 
 
return view('monitoring', compact('data'));
 
}

- And the view. Easy just 

{{ $data['monitor'] }}


When i try i get this error ( you can see a print in attachment):

htmlspecialchars() expects parameter 1 to be string, object given


What i doing wrong ? The target is to get all the campaings on my adwords account.

Do you have an idea?

Thanks for you help

monitor_bug.jpg

Luis Xander Talag (AdWords API Team)

unread,
Aug 2, 2018, 11:52:20 PM8/2/18
to AdWords API and Google Ads API Forum
Hi,

My apologies as we do not support other third party platform integration with AdWords API like Laravel in this forrum. Our team could only provide support on AdWords API related issues/concerns. However, for basic operations like getting all your campaigns, you could check this sample code in PHP for your reference. If you encounter any issues related to AdWords API, feel free to write back.

Thanks and regards,
Luis
AdWords API Team

Mnk

unread,
Aug 3, 2018, 4:37:27 AM8/3/18
to AdWords API and Google Ads API Forum
Hi,

Thanks for reply but the language of Laravel it's PHP so i don't understand :(.

Regards

Luis Xander Talag (AdWords API Team)

unread,
Aug 3, 2018, 5:50:44 AM8/3/18
to adwor...@googlegroups.com
Hi,

I'm afraid we do not provide support for Lavarel in this forum. However, you may try to post your issue in this link as the PHP client library owners are better equipped to look into this.

Regards,
Luis
AdWords API Team

Mnk

unread,
Aug 3, 2018, 6:17:01 AM8/3/18
to AdWords API and Google Ads API Forum
Hi,

ok i post on the given link.

Have a good day.

Regards,
Reply all
Reply to author
Forward
0 new messages