How to install Google Application for domain from New Marketplace.? - google-apps-marketplace

I have done setup of project using New Marketplace. When i click on "Test Install Flow" (Api Console) ,one popup is coming, asking for permissions (scopes) to access domain. When i accept "Terms and Conditions" pop up closed.It is not redirecting to setup url. is this correct behaviour.? or It should need to redirect to setup url.

If you're trying to deploy an Google Apps Marketplace but restrict it to your domain, you can publish it to the Chrome Web Store and limit the visibility to your domain.

Related

How to download credentials.json in Gmail API Enable Java

I am trying to enable Gmail API following steps in Java Quickstart. When I click on "Enable the Gmail API" button in the Google developer console, no option like "Download Client Configuration" is displayed.
So, I am unable to get credentials.json File.
Gmail API credentials are restricted to enhance apps security. To enable the credentials click on API Console after clicking on Enable the Gmail API. You will travel to a filled form on the Credentials menu on Google APIs. You can change there the name and/or restrictions to better suit your project. Finally, you can click on Generate key to finish the process.
If you have followed the steps so far, you would have created the Gmail API credentials. To achieve your request you will need to click on Download JSON button on the right side of your newly created credentials. Do not hesitate to ask for more information if I haven't explained the process with enough detail.
Just enabling the Gmail api isnt going to create client credential for you. Unfortunately the developer console changes more often then the quick starts get updated so it can be difficult to understand.
Go to the https://console.developers.google.com
Find the credentials tab on the left and click the Create credentials button
You are probably going to be looking for an oauth client id, as service accounts only work with gmail if you are connecting to a gsuite account.

Need to access user token for Slack app

I am building a Slack App and planning to distribute it in the Slack App Directory so that other users can install it. I am using Slash commands for this app. Now when I get my API called after some user type my Slash command then I want to access some of the user information using WEB APIs. But to access the info I need user token to call the WEB API. With Slash command request object I am not getting any user token. So my question is how can I get the user token at this time to access the information. Do I need to save this when user installs the app or do I need to provide the Add to Slack button for this?
Yes, your app will receive the access token for a team / workspace only as result of a successful installation process and should then store it together with the team ID for later use. Each slash request includes the team ID which allows you identify the correct access token for each team.
There are two approaches for installing Slack apps, which can be chosen on the "Manage your apps" pages under "Basic Information". Here is how it looks:
Installation from landing page
Having your own website with a "Add to Slack" button is the easiest way to to that. You website will then need to handle the installation process, which basically is a Oauth flow. You should also make sure to request the right permissions, so that you can later access the API methods that you need. This installation approach is called "Installation from landing page".
Installation from App Directory
Another way to install your app is "Install from App Directory". This will allow users to start the OAuth process directly from the App directory, instead of having to click a "Add to Slack button" on a website. Its has the same effect as clicking a custom "Add to Slack button", so you still need a website behind it to handle the full OAuth flow.
Important: This option is only available to apps that have been approved by Slack and are listed on the App directory.
Further Reading
Installation approaches
Oauth process with Slack

How to find a Windows Store App's SID?

I am trying to integrate facebook into a Windows Store App.
I have created a new FB App and started working through the steps described in this blog post. http://blogs.windows.com/buildingapps/2013/11/14/facebook-login-for-windows-store-apps/
​​
Here is where I ran into a problem. Step 2 describes how to obtain a Windows SID for an App that has yet to be published. However my app is already published. Does anyone know how to obtain a SID for an app that is already published in the Windows Store?
Instructions in this post should help you find how to locate SID for published app: https://msdn.microsoft.com/en-us/library/windows/apps/hh465407.aspx
It's listed under step 3 for obtaining the credentials for your app. Here are the steps:
Go to the Windows Store apps page of the Windows Dev Center and sign in with your Microsoft account.
Once you have signed in, click the Dashboard link.
On the Dashboard, select Submit an app.
On the Submit an app page, select App name.
Select the Services link.
On the Services page, select the Live Services link found under the Microsoft Azure Mobile Services section.
On the Push notifications and Live Connect services info page, select Identifying your app.
The Identifying your app page gives you an identity element to include in your app's manifest. Open your manifest in a text editor and add that element as the page instructs.
9.Click the Authenticating your service link at the bottom of that same Identifying your app page.
The Authenticating your service page provides your security identifier (SID) and client secret.
I see it's an old post, but I guess it's better to show a simpler solution, which is the one told by microsoft in this thread: https://msdn.microsoft.com/en-us/windows/uwp/publish/view-app-identity-details
You can just go to your application from the developer dashboard, then on the left you should expand the "App Management" option and choose "App Identity". There you can find many informations, including the App SID.

How to test installation on non dev domain

I'm developing a google apps marketplace app. There's the Test install flow button on the dashboard, but I'd like to test installation on another domain of ours - to see that permissions, token etc. work as expected. Is there a way to install an (it's non published yet) on a domain which is not related to development?
Found a solution, this was surprisingly straightforward, but it worked for me:
Open two browser windows, one for your dev account (dev.com) and one for the domain you wish to test on (test.com)
In you dev account, go to the dashboard and click the Test installation flow button
In the popup that you get, go to the address bar and copy the link
Now go to the browser with your test.com domain, and enter this address
You'll be asked to login, and then you'll get the consent screen
You should now see the app in your test.com`s marketplace apps list
You can do this by creating a new application in the chrome web store.
Make sure that you create this application in the web store with an account that belongs to the given domain. Next, restrict access to your domain.
Finally, you can install the application on the domain.

Setup Url for Google Apps Marketplace (GAMv2) doesn't redirect

I've created a test listing for Google Apps Marketplace (GAMv2) and have specified a setup url. When testing using the "TEST INSTALL FLOW" button, the authorization screen pops up and clicking the "Accept" button takes me to a popup that confirms the application has been added. There's a "Launch app" button and a "Manage app" link on this 2nd popup. The "Launch app" button goes to the setup url that I entered in the listing definition.
Isn't the install flow supposed to redirect there automatically? I've seen other questions where this behaviour seems to be working on and off:
Google Marketplace App Install Flow
Google Apps Marketplace SDK install does not forward user to Setup URL
Google app marketplace sdk setup url stopped working
There's also this page in the marketplace documentation which says it is supposed to redirect:
https://developers.google.com/google-apps/marketplace/eap/oauthwalkthrough
Are other people having this problem?
In v1 of the marketplace, yes, set up links were automatically included in the linear install flow. In the new install flow set up links are presented separately. They're presented to users, but there is no guarantee that that a user will click it. Even in V1 there were some cases where a user could end up bypassing the setup link.
There are some improvements that can be made to encourage admins to revisit the setup if they skipped it. In either case, apps should be tolerant of these cases and adapt.
My recommendation is to check on login and enter the setup flow if it hasn't yet been performed. You can use the licensing API to check if the domain has installed from the marketplace or not. If you need to enforce things like requiring admin permissions, you can add further checks to see if the current user is an admin for the domain and give non-admin users a polite message indicating the app isn't ready for them to use yet.

Resources