Yes, it is. But i think 3legged is better
<?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>
// Create an OAuth factory to use GOAuthRequestFactory 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 RequestFactory CalendarService 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 use GOAuthRequestFactory 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!
![]() |
Alexandre Jacquet Google Apps Deployment Specialst |
--
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/-/9BF51AKCaEEJ.
I tried gooleapps for business, and am using my own domain now, it is working. But still to change the language it takes about 20 minutes toi come into effect where you can see the actual change.
how to get user credentials e.g (username or password) through token access. and how to use the above mentioned service through token without having to hard code the username and password again. A prompt reply would be greatly appreciated, since were in the middle of deployment. Thank you