c# - Email Settings API Auth2.0 Update Signature -


where going wrong here? when try url says: "required parameter missing: response_type". need add thing work? , if can provide simple explanation that'd awesome.

string client_id = "xxxxxxx";         string client_secret = "xxxxxxxxxxx";         string scope = "https://apps-apis.google.com/a/feeds/emailsettings/2.0/workwearoutlet.co.uk/zak.baig/signature";         string redirect_uri = "urn:ietf:wg:oauth:2.0:oob";          // prepare oauth parameters         oauth2parameters parameters = new oauth2parameters();          parameters.clientid = client_id;         parameters.clientsecret = client_secret;         parameters.scope = scope;         parameters.redirecturi = redirect_uri;          string applicationname = "signature";         string domain = "workwearoutlet.co.uk";          // request authorization user         string authorizationurl = oauthutil.createoauth2authorizationurl(parameters);         console.writeline(authorizationurl);         console.writeline("please visit url above authorize oauth " +             "request token. once complete, type in access code " +             "continue...");         parameters.accesscode = console.readline();          oauthutil.getaccesstoken(parameters);         string accesstoken = parameters.accesstoken;         console.writeline("oauth access token: " + accesstoken);          try         {             // create new request factory uses our oauth credentials             goauth2requestfactory requestfactory = new goauth2requestfactory("apps", applicationname, parameters);              googlemailsettingsservice service = new googlemailsettingsservice(domain, applicationname);             service.requestfactory = requestfactory;              // update signature user testusername             service.updatesignature("zak.baig@workwearoutlet.co.uk", "my tiny signature");              console.writeline(service.retrievesignature("zak.baig@workwearoutlet.co.uk"));         }          catch (appsexception a)         {             console.writeline("a google apps error occurred.");             console.writeline();             console.writeline("error code: {0}", a.errorcode);             console.writeline("invalid input: {0}", a.invalidinput);             console.writeline("reason: {0}", a.reason);         } 

i believe best achieved using php oauth2 api.

this removes issues badly written c# api calling functions.

also, have tried search function? have found multiple fixes problem.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -