Thursday, January 3, 2013

Digest for adsense-api@googlegroups.com - 16 Messages in 5 Topics

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

    ronena@codeoasis.com Jan 02 11:54PM -0800  

    Hi everyone,
     
    I'm working on an application that integrates with Google's AdSense host
    API's services. I'm having some problems getting a complete flow. So far I
    have a user without an AdSense account. I redirect that user to the
    redirect URL I got by calling associationsessions.start<https://developers.google.com/adsense/host/v4.1/associationsessions/start> (as
    described here <https://developers.google.com/adsense/host/signup>). That
    user is then requested to go through the process of signing up to AdSense.
    After that user has finished it gets back to my website, I verify the token
    and get it's publisher's Id.
     
    The user didn't had to wait for approval though, and it instantly got a
    (what seems to be) functional AdSense account. Here are the problems I'm
    having:
     
    1. I'm able to create new ad units for that user through the AdSense
    host API and can get a list of all ad units I created for that user.
    However, when I try to get the code for an ad unit through the getAdCode<https://developers.google.com/adsense/host/v4.1/accounts/adunits/getAdCode> method
    (as described here <https://developers.google.com/adsense/host/adunits>)
    I'm getting a 400 error code (bad request) from Google (I get the code
    without any problems, but I'm getting JavaScript errors when I put the code
    I get into a HTML page).
    I also created a new ad unit with that user (not through the AdSense
    host API) and then tried to put the code I get manually and I still got the
    same 400 error.
    I checked (through the accounts: get<https://developers.google.com/adsense/host/v4.1/accounts/get> method)
    and the user's status is set to APPROVED. Is this something that's related
    to the AdSense host API? or is it something I'm doing wrong?
    I know for a fact it's not anything related to the HTML page I put the
    code in, because if I only change some of the JavaScript configuration
    parameters (such as google_ad_client) to different ones, I would get a
    working ad unit.
    2. I can see that the code I get from AdSense can be customized with
    different colors and fonts with JavaScript parameters (such
    as: google_color_bg, google_ad_type, etc) and I can also change an ad
    unit's style by editing it through the AdSense host API. Which way is
    better if I want to customize a user's ad unit? Is there a way to get a
    customized JavaScript code through the AdSense API?
    Also, I can see that I can't change the size of an ad unit one it's
    created (I'm getting a message that the size property is read only back
    from the API). Does this mean that the only way I can have an ad unit
    presented in different sizes is by editing the JavaScript configuration I
    get by calling getAdCode<https://developers.google.com/adsense/host/v4.1/accounts/adunits/getAdCode>
    ?
    3. This looks like a bug: I can edit an ad unit's corner style to SQUARE
    and VERY_ROUNDED but I can't edit it to ROUNDED (described here<https://developers.google.com/adsense/host/adunits>).
    Trying to update an ad unit's corner style to ROUNDED won't throw any
    exceptions from the API and I'm getting a success message from the API but
    the value is set to null instead of ROUNDED.
     
    Could some of these problems relate to the fact that I'm using a sandbox
    account (only as a host, I tried signing up to ad sense through my host as
    a newly created Google account)?
     
    Thanks in advance, Ronen.

     

    sorry chou <sorry.chou@gmail.com> Jan 02 02:06AM -0800  

    HELLO:
     
    does anyone knows how to use AdUnit.insert api to insert AFMC adunit?
     
    where can find document or example?
     
    thanks!

     

    "Sérgio Gomes (AdSense API Team)" <adsenseapiadvisor+sergio@google.com> Jan 02 05:26AM -0800  

    Hi there!
     
    It should be very similar to AFC, but using the properties in
    "mobileContentAdsSettings" instead. You can take a look at
    https://developers.google.com/adsense/host/v4.1/accounts/adunits for the
    list of properties.
     
    Cheers,
    Sérgio
     
    ---
    Sérgio Gomes
    Developer Relations
     
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
    9TQ
    Registered in England Number: 3977902
     
    On Wednesday, 2 January 2013 10:06:08 UTC, sorry chou wrote:

     

    sorry chou <sorry.chou@gmail.com> Jan 02 11:47PM -0800  

    Hello:
     
    Thanks for your quickly response!
     
    mobileContentAdsSettings.type (TEXT/IMAGE/?)
    mobileContentAdsSettings.size string (SIZE_320_50 ?)
    mobileContentAdsSettings.markupLanguage (XHTML ?)
    mobileContentAdsSettings.scriptingLanguage (PHP ?)
     
    i try to set value to those fields but don't work, do you know the
    available value of each field?
     
    thanks!!
     
    Sérgio Gomes (AdSense API Team)於 2013年1月2日星期三UTC+8下午9時26分04秒寫道:

     

    sorry chou <sorry.chou@gmail.com> Jan 02 02:01AM -0800  

    HI ALL:
     
    when i start a new account associate, i add four productCode the same as
    document
     
    https://developers.google.com/adsense/host/v4.1/associationsessions
     
    but 'AFF' can't work, remove from productCodes fields then it works.
     
    now i use Account.adclients.list, the AFS not show, why?
     
    thanks!

     

    "Sérgio Gomes (AdSense API Team)" <adsenseapiadvisor+sergio@google.com> Jan 02 06:29AM -0800  

    Hi there,
     
    AFF and AFC account creation are unsupported in v4.1 of the Host API.
     
    AFF is no longer available since the product has been deprecated at the
    AdSense level. As for AFS, we're evaluating the possibility of adding
    support for account creation/association to a future release of the Host
    API.
     
    Cheers,
    Sérgio
     
    ---
    Sérgio Gomes
    Developer Relations
     
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
    9TQ
    Registered in England Number: 3977902
     
    On Wednesday, 2 January 2013 10:01:05 UTC, sorry chou wrote:

     

    "Sérgio Gomes (AdSense API Team)" <adsenseapiadvisor+sergio@google.com> Jan 02 06:30AM -0800  

    Sorry for the typo, the first line should obviously read "AFF and AFS
    account creation are unsupported in v4.1 of the Host API." :)
     
    Cheers,
    Sérgio
     
    ---
    Sérgio Gomes
    Developer Relations
     
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
    9TQ
    Registered in England Number: 3977902
     
    On Wednesday, 2 January 2013 14:29:18 UTC, Sérgio Gomes (AdSense API Team)
    wrote:

     

    sorry chou <sorry.chou@gmail.com> Jan 02 11:47PM -0800  

    HI:
     
    OK, thank you !
     
    Sérgio Gomes (AdSense API Team)於 2013年1月2日星期三UTC+8下午10時30分09秒寫道:

     

    sorry chou <sorry.chou@gmail.com> Jan 01 10:17PM -0800  

    hello:
     
    i want to add customchannel to adunit, and the document says using optional
    parameter "hostcustomchannelid" when call "getAdCode" as follows
    $adSenseHost->accounts_adunits->getAdCode($accountid, $clientid, $adunitid,
    $hostCustomChannelId);
     
    but always get error message "(getAdCode) missing required param:
    'adClientId'"
     
    remove hostCustomChannelId can get success message, why?
     
    and how to add more than one channel?
     
    thanks!

     

    "Sérgio Gomes (AdSense API Team)" <adsenseapiadvisor+sergio@google.com> Jan 02 06:39AM -0800  

    Hi there,
     
    adClientId is one of the required parameters, and is usually in the form
    "ca-pub-xxxxx" for AFC, so make sure you're including that in your request.
    You can retrieve all ad clients with the respective "list" method.
     
    As for specifying multiple custom channels, this is already possible; the
    API call can take this parameter multiple times. In the case of PHP, giving
    the method an array of custom channel IDs should do the trick.
     
    Cheers,
    Sérgio
     
    ---
    Sérgio Gomes
    Developer Relations
     
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
    9TQ
    Registered in England Number: 3977902
     
    On Wednesday, 2 January 2013 06:17:31 UTC, sorry chou wrote:

     

    sorry chou <sorry.chou@gmail.com> Jan 02 11:54PM -0800  

    HI:
     
    you right !!, customchannelid type is array, thanks!!
     
    but new problem is when array data more than one, result error '(getAdCode)
    unknown parameter: '1'
     
    using php client api
     
    thank you!

     

    Ashesh Bharadwaj <ashesh@paradisepublishers.com> Jan 02 01:08PM +0530  

    Hi Sérgio,
     
    Can you please any help me on my last post :)
     
     
    On Mon, Dec 31, 2012 at 4:22 PM, Ashesh Bharadwaj <
     
    --
    Regards,
     
    Ashesh Bharadwaj

     

    "Sérgio Gomes (AdSense API Team)" <adsenseapiadvisor+sergio@google.com> Jan 02 05:23AM -0800  

    Hi Ashesh,
     
    Could you email us privately with the full logs (request and response) to
    this call, so that we can debug the issue? Thanks!
     
    Cheers,
    Sérgio
     
    ---
    Sérgio Gomes
    Developer Relations
     
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
    9TQ
    Registered in England Number: 3977902
     
     
    On Wednesday, 2 January 2013 07:38:49 UTC, Ashesh Bharadwaj wrote:

     

    Ashesh Bharadwaj <ashesh@paradisepublishers.com> Jan 02 06:56PM +0530  

    Thanks a lot Sérgio. Sure will do that.
     
     
    On Wed, Jan 2, 2013 at 6:53 PM, Sérgio Gomes (AdSense API Team) <
     
    --
    Regards,
     
    Ashesh Bharadwaj

     

    Ashesh <ppashesh@gmail.com> Jan 02 05:36AM -0800  

    Thanks again Sérgio. I have emailed the data.
     
    On Wednesday, January 2, 2013 6:56:10 PM UTC+5:30, Ashesh Bharadwaj wrote:

     

    "Sérgio Gomes (AdSense API Team)" <adsenseapiadvisor+sergio@google.com> Jan 02 06:32AM -0800  

    Hey everyone,
     
    The problem turned out to be a couple of missing
    properties: backupOption.type and customStyle.colors.text.
     
    The error messages in this situation aren't exactly the clearest, so I'll
    be talking to the team to see if we can improve on them for future releases.
     
    Cheers,
    Sérgio
     
    ---
    Sérgio Gomes
    Developer Relations
     
    Google UK Limited
    Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W
    9TQ
    Registered in England Number: 3977902
     
     
    On Wednesday, 2 January 2013 13:36:25 UTC, Ashesh wrote:

     

You received this message because you are subscribed to the Google Group adsense-api.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.

--
You received this message because you are subscribed to the Google Groups "AdSense API Forum" group.
To post to this group, send email to adsense-api@googlegroups.com.
To unsubscribe from this group, send email to adsense-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/adsense-api?hl=en.

No comments:

Post a Comment