Hi Clare, Have you tried using our python client library ? http://code.google.com/apis/apps/libraries_and_samples.html#provisioningv2
Updating signature could be as simple as: import gdata.apps.emailsettings.service emailsettings = gdata.apps.emailsettings.service.EmailSettingsService (email='[email protected]', domain='example.com', password='passw0rd'); emailsettings.ProgrammaticLogin() emailsettings.UpdateSignature(username='admin', signature='devleoper, abcd inc') -Anirudh On Mar 29, 5:11 am, clarewood <[email protected]> wrote: > hi guys > > i'm hoping this is an easy one and i'm having a dumb blonde moment. > > i'm trying to use the API to set the signature for a mail account and > after getting thru all the "token incorrect" issues, i've reached the > end point of trying to set the signature for an account and i'm > getting the error: "This request is not supported." > > no error numbers, no nothing. just that string dumped into the > browser. my code is pasted below .. is anyone able to point me in the > right direction? i'm stumped!! > > cheers > > clare :) > > $url = "https://www.google.com/accounts/ClientLogin"; > $ch = curl_init(); > curl_setopt($ch, CURLOPT_URL, $url); > > $to_post="&[email protected]&Passwd=pword&accountType=HOSTED&service=apps"; > curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: > application/x-www-form-urlencoded")); > curl_setopt($ch, CURLOPT_POSTFIELDS, $to_post); > ob_start(); > curl_exec ($ch); > curl_close ($ch); > $return = ob_get_contents(); > ob_end_clean(); > > $auth=substr($return, (strpos($return, "Auth")+5),strlen > ($return)); > > $sig=htmlentities('<?xml version="1.0" encoding="utf-8"?> > <atom:entry xmlns:atom="http://www.w3.org/2005/Atom" > xmlns:apps="http://schemas.google.com/apps/2006"> > <apps:property name="signature" value="Liz Jones - (+1) > 619-555-5555 > Accounts Management, A&Z LTD." /> > </atom:entry>'); > > $ch = curl_init(); > curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-type: > application/atom+xml","Authorization: GoogleLogin auth=".$auth)); > curl_setopt($ch, CURLOPT_URL, 'https://apps-apis.google.com/a/ > feeds/emailsettings/2.0/yourpropertyclub.com/murray/signature'); > curl_setopt($ch, CURLOPT_PUT, $sig); > curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); > $output = curl_exec($ch); > $error = curl_error($ch); > curl_close($ch); > > echo $output; > > if ($error) { > print "<br /><br />$error"; > > } --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Apps APIs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-apps-apis?hl=en -~----------~----~----~----~------~----~------~--~---
