Can I please have a working code sample? Here is my current manifest:
<?xml version="1.0" encoding="UTF-8" ?><ApplicationManifest xmlns="http://schemas.google.com/ApplicationManifest/2009"> <Name>Cagedtornado awesome test app</Name> <Description>Demonstrates a simple but awesome Cagedtornado Google Apps Marketplace application</Description> <!-- Administrators and users will be sent to this URL for application support --> <Support> <Link rel="support" href="http://www.cagedtornado.com" /> </Support> <!-- Show this link in Google's universal navigation for all users --> <Extension id="navLink" type="link"> <Name>Hello World</Name> <Url>http://testapp.cagedtornado.com/account/login?from=google&domain=${DOMAIN_NAME}</Url> <Scope ref="calendarAPI"/> <Scope ref="emailSettingsAPI"/> </Extension> <!-- Declare our OpenID realm so our app is white listed --> <Extension id="realm" type="openIdRealm"> <Url>http://testapp.cagedtornado.com/</Url> </Extension> <!-- Need access to the Calendar API --> <Scope id="calendarAPI"> <Url>https://www.google.com/calendar/feeds/</Url> <Reason>This app displays the user's next upcoming Google Calendar appointment.</Reason> </Scope> <Scope id="emailSettingsAPI"> <Url>https://apps-apis.google.com/a/feeds/emailsettings</Url> <Reason>This app adjusts vacation autoresponders.</Reason> </Scope></ApplicationManifest> I'm currently using this code to get calendar information, and *it works great*: // Create an OAuth factory to useGOAuthRequestFactory requestFactory = new GOAuthRequestFactory("c1", APPLICATION_NAME); // Available from vendor profile page (next to each application)// when logged into the Marketplace requestFactory.ConsumerKey = "consumer_key_removed"; requestFactory.ConsumerSecret = "consumer_secret_removed"; // Create the CalendarService and set its RequestFactoryCalendarService service = new CalendarService(APPLICATION_NAME); service.RequestFactory = requestFactory; // Query the service with the parameters passed to the function// NOTE: THIS GETS EVENTS IN THE FUTURE - if you don't have events in the future in// the target calendar, they won't show up here.EventQuery query = new EventQuery(); query.Uri = new Uri("https://www.google.com/calendar/feeds/default/private/" + projection); query.OAuthRequestorId = requestorId; query.NumberToRetrieve = maxResults; query.SingleEvents = singleEvents; query.StartTime = DateTime.Now; query.SortOrder = CalendarSortOrder.ascending; EventFeed resultFeed = service.Query(query);return resultFeed; But when I try to use *this code to get email settings*, it *fails with a 401* error on the line that calls 'RetrieveVacation'. // Create an OAuth factory to useGOAuthRequestFactory requestFactory = new GOAuthRequestFactory("m1", APPLICATION_NAME); // Available from vendor profile page (next to each application)// when logged into the Marketplace requestFactory.ConsumerKey = "consumer_key_removed"; requestFactory.ConsumerSecret = "consumer_secret_removed"; requestFactory.UseSSL = true; GoogleMailSettingsService service = new GoogleMailSettingsService(domain, APPLICATION_NAME); service.RequestFactory = requestFactory; AppsExtendedEntry vacation = service.RetrieveVacation(requestorId);return vacation.Title.Text; I'm pulling my hair out. *Please help*! -- You received this message because you are subscribed to the Google Groups "Google Apps Domain Information and Management APIs" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-apps-mgmt-apis/-/oa_ImFMhGKkJ. 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-mgmt-apis?hl=en.
