I am developing a web app which is distributed over various client domains where some of the clients use Google Apps for Work and requested a service which would be able to insert events from the system into their GAPPS users calendars. I have implemented a domain-wide delegation to access their GAPPS domains. Everything works fine so far, however in the current stage the GAPPS administrators have to copy our client_id and requested scopes from our web app manually in order to authorize our app. I was thinking to list our web app on Google Apps Marketplace (or CWS whichever is up to date) just for the purpose so they can simply "install" it and that would provide the authorization we need as it seems much more user friendly and less error prone. The problems I am facing now are:
The only way to implement point 2. I can think of is to not even use a "Integrate with Google" button, but a simple button which would fire up a new tab with the address of our marketplace app to install and then e.g. universally redirect everybody on the homepage of our company which they can later close, but still have the web app opened in the previous tab.
Or is there some better way to do it? Maybe achieve the redirection back from where it originally came from? Please do correct me if I understand something wrong or it just doesn't make any sense at all.
Thank you in advance!
1.- Yes, having an application that implements domain-wide delegation to make actions on domain user's behalf is acceptable in Marketplace. There some rules you have to follow (like having corresponding scopes in the configuration and in the application) , but as you mentioned your app is already working, i don't think you will have much difficulties on that.
2.- When configuring the Universal Navigation Extension, you can add the parameter ${DOMAIN_NAME} in the URL and it will be automatically replace with the name of the user's domain. the url should look like this: http://www.example.com/ga/?domain=${DOMAIN_NAME}
3.- i'm not sure what you mean in this point.
The "integrate with Google" button is useful so the users can install your app from you website, and not having to access to their admin console and then open Marketplace and then look for your app and then install it. It makes it easier to install your app. However, it is up to you if you want to add it on your website or to show it only for your registered clients.
Hope this helps.