Why MediaId is null for type=image Ads ? Though I can see the ReferenceId.

59 views
Skip to first unread message

Muhammad Ahsan Amin

unread,
Oct 4, 2017, 9:27:11 AM10/4/17
to AdWords API Forum
Hello Adwords API Support Team.

I am having a some trouble with AdGroupAdService.ImageAd. So I search for an AdGroupAd via its Id which successfully return data. Basically its an Image Ad and I can see the details of Image however MediaId for the Image is Null though ReferenceId is there. Can you please help me out to understand , or its a known thing. Sorry I can't find this in Docs so asking here.

By the way I also tried to search the media with its ReferenceId (same as shown in screenshot) but I get error if I try to find = `-2405310583298588672`. Just for sake of curiosity I checked another one with id = `5548361980751904768 ` which returns and I can also see the MediaId in its object.

Favorablly MediaId should be returned in Image Object but even if it is not returned I can't even search it with given ReferenceId. I have a guess that it maybe deleted but still there is not option to set Status = Deleted and use Predicate.
 
Below are the details of the account:

I am using Php Adwords Library version: 30.0

Google UserId = 112120068306110227561 ( I can share my refresh_token if needed)
Account Id = 1208188819
AdGroupAdId = 112955367804

Regards,

-Ahsan

Screen Shot 2017-10-04 at 17.44.13.png

Shwetha Vastrad (AdWords API Team)

unread,
Oct 4, 2017, 2:13:19 PM10/4/17
to AdWords API Forum
Hi Ahsan,

Could you enable logging and provide the logs for the AdGroupAdService.get() request and the MediaService.get() request which returned an error when you tried to retrieve the media with referenceId `-2405310583298588672`? Please use Reply privately to author when responding. 

Thanks,
Shwetha, AdWords API Team.

Muhammad Ahsan Amin

unread,
Oct 17, 2017, 9:54:27 AM10/17/17
to AdWords API Forum
> This is just to document the latest Response Summary. There were multiple private emails exchanged for this thread (Due to confidentiality of data).

So, shortest answer is that it is by design that MediaId can be returned as Null for Image objects in Reports. Currently it is not mentioned in documents but the docs will be updated. 

The other part of question why Media ReferenceId can't be found via MediaService if searched as Predicate. The answer is its also possible, not sure about full details though!

In short Media ReferenceId is the most trusted value returned by a Media object of Google!

Reply all
Reply to author
Forward
0 new messages