Saturday, July 27, 2013

Digest for adsense-api@googlegroups.com - 3 Messages in 1 Topic

Group: http://groups.google.com/group/adsense-api/topics

    Tony John <tonyjohn@gmail.com> Jul 26 03:41AM -0700  

    In the previous response, I had not used the correct value for "kind"
    property. I have updated it now and here is the new JSON data for request
    body:
     
    "{\"code\":\"\",\"id\":\"\",\"kind\":\"adsensehost#adUnit\",\"name\":\"Demo
    Ad1\",\"customStyle\":{\"kind\":\"adsensehost#adStyle\",\"corners\":\"VERY_ROUNDED\",\"colors\":{\"border\":\"FF0000\",\"title\":\"000000\",\"background\":\"FFFFFF\",\"text\":\"00FF00\",\"url\":\"0000FF\"},\"font\":{\"family\":\"ACCOUNT_DEFAULT_FAMILY\",\"size\":\"ACCOUNT_DEFAULT_SIZE\"}},\"contentAdsSettings\":{\"type\":\"TEXT\",\"size\":\"SIZE_300_250\",\"backupOption\":{\"type\":\"COLOR\",\"color\":\"FFFFFF\",\"url\":\"\"}},\"mobileContentAdsSettings\":{\"type\":\"\",\"size\":\"\",\"markupLanguage\":\"\",\"scriptingLanguage\":\"\"}}"
     
     
     
    On Thursday, 25 July 2013 16:04:13 UTC+5:30, Jose Alcérreca (AdSense API
    Team) wrote:

     

    Tony John <tonyjohn@gmail.com> Jul 26 03:36AM -0700  

    Jose,
     
    I did not have any success with the API Explorer as well, but that gives a
    different error. Whatever Account Id I use, I am getting an error saying
    the account id is not valid.
     
    Here is the JSON data I am passing in the request body:
     
     
    {\"code\":\"\",\"id\":\"\",\"kind\":\"\",\"name\":\"Demo
    Ad1\",\"customStyle\":{\"kind\":\"\",\"corners\":\"VERY_ROUNDED\",\"colors\":{\"border\":\"FF0000\",\"title\":\"000000\",\"background\":\"FFFFFF\",\"text\":\"00FF00\",\"url\":\"0000FF\"},\"font\":{\"family\":\"ACCOUNT_DEFAULT_FAMILY\",\"size\":\"ACCOUNT_DEFAULT_SIZE\"}},\"contentAdsSettings\":{\"type\":\"TEXT\",\"size\":\"SIZE_300_250\",\"backupOption\":{\"type\":\"COLOR\",\"color\":\"FFFFFF\",\"url\":\"\"}},\"mobileContentAdsSettings\":{\"type\":\"\",\"size\":\"\",\"markupLanguage\":\"\",\"scriptingLanguage\":\"\"}}
     
    Do you see anything wrong in the JSON data?
     
     
     
    On Thursday, 25 July 2013 16:04:13 UTC+5:30, Jose Alcérreca (AdSense API
    Team) wrote:

     

    "Jose Alcérreca (AdSense API Team)" <adsenseapiadvisor+jose@google.com> Jul 26 03:59AM -0700  

    Hi Tony,
     
    It could be related to the empty mobileContentAdsSettings but you should
    use the APIs explorer for this. Authenticate with your host account
    (sandbox or production). Make sure the account ID is your publisher's and
    that the ad client ID belongs to the publisher account.
     
    https://developers.google.com/adsense/host/v4.1/accounts/adunits/insert
     
    Check the client libraries' samples to make sure every required field is
    added to the request.
     
    Let us know if you find the problem.
     
    Cheers,
    Jose
     
     
    ---
    Jose Alcérreca
    Developer Relations
     
     
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
    9TQ
    Registered in England Number: 3977902
     
     
    On Friday, 26 July 2013 11:41:57 UTC+1, Tony John wrote:

     

--
You received this message because you are subscribed to the Google Groups "AdSense API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adsense-api+unsubscribe@googlegroups.com.
To post to this group, send email to adsense-api@googlegroups.com.
Visit this group at http://groups.google.com/group/adsense-api.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment