Webhook when new domain installed my app - google-apps-marketplace

I'm working on GSuite application and wondered how my backend can be notified when new domain admin installs my app?

You can use the license notification api to retrieve a list of current installs. https://developers.google.com/apps-marketplace/v2/reference/licenseNotification/list
After installation the user will probably start or setup your app. You could add your own webhook notification when the user goes through this First Run Experience. (This is what we did)
There is another thing you might be able to pull off: As far as i know, an event is fired to Google Analytics on install. Maybe you can add an alert/webhook in Google Analytics.
However, i was having some problems with the events to show up in GA in the first place.

Related

Microsoft teams app: How to maintain versioning of backend services

We have developed a app for Microsoft teams and our first version was published on the app store. We are now working on the next version. However we are not sure how we have to submit the new version for team store review without impacting the existing users. For instance, some of our bot commands will behave differently in the new version. If we have only one backend instance running, when we submit it to store team for review we will impact the experience of existing production users as well.
Ideally we would follow a blue-green approach to release new features to selected customers, but in this case we are not really sure how and where to differentiate requests coming (mainly through bot communication, since we can add a app version header in web communication) from multiple versions of the app. We thought of creating new set of resources (app registration, bot channel registration etc) on Azure portal but I guess that would be treated as a new app and not a version update.
Any ideas or pointers on how to achieve this would be of great help.
This is a good point, I don't think there's anything out of the box to deal with this. What you've suggested might indeed be the best way:
create new app registration & bot channel registration, with temporary name (e.g. MyBot2)
update manifest to use new bot, and submit for store approval with this manifest
once approved, and app is live (you can schedule a go-live time when you submit the app), rename both bots (original to MyBotV1 or something, and MyBot2 to MyBot)
In any case, I'd work with the app submission team around this, they're very helpful and engaged.

Play & App Store Webhooks / Server Side Code on subscription start and cancel

I need to add server side logic when a user buys and cancels a subscription. To me this seems like a basic feature that many apps probably use. However as it turns out it's not that simple to setup up the need webhooks.
My App will be available on android and iOS, so I will need to configure both, which is why I thought about using RevenueCat. But it turns out, this is a paid feature for $110/month, which is way too much for a/my new app. This is probably the biggest time saver for RevenueCat compared to using the official InApp Purchases packages, so I don't see why they would make it a paid feature.
Anyways what the best way to handle webhooks with the Play Store and the App Store? Any Guides and Tipps would be very helpful!
Apple and Google both offer server-to-server notifications that will notify you when a subscriber cancels.
Apple guide: Enabling Server-to-Server Notifications
Google guide: Real-time developer notifications
If you have your own user Ids, they won't be present in these server notifications so on your server you can save the user Id along with the transaction identifier of their original purchase. That way when a notification comes in you can look up the user from the transaction identifier and flag them as cancelled.
Alternatively, the RevenueCat API is included on their free plan so you can periodically poll their GET /subscribers endpoint to get the latest subscription status for a user. This obviously won't be real-time, but may be enough for your use-case.
Update: I decided to solve this issue similar as #enc_life suggested with the RevenueCat API. For validation the purchase, I send a request to my server, that checks with if the user actually bought the subscription. For canceling the subscription, I execute a function everyday on my server, that checks for all subscribers if the subscription is still valid.

How can I build a webapp which uses google calendar api without having to become verified?

What I want to build:
I want to build a website where users can connect their google calendars (this will use Google Calendar API's)
and view their calendar events, as well as edit them, and create new ones.
My problem:
In order to do so, google says my app needs to be verified, which can take weeks, and I also need to set up terms of services pages, privacy policy pages
I also need to supply authorised javascript origins which MUST start with https, which of course is a problem during development, since my origin is http://localhost
I also need to set up support emails and homepage link
Question
I just want to start building my application without having to set up a whole production-ready website eco system.
Is there anyway I can use these Google Calendar APIs for editing/creating calendar events locally, without having to set up everything mentioned above first?
Unverified apps can still be used by the developer who created the project on google developer console.
Unverified app screen
The app or script might display an "unverified app" screen before it displays the consent screen. This is based on the specific scopes that your app includes in the request.
You can still work on your app while you are going though the verification process. However that being said i would start that process asap it can take a long time to get verified.
Yes, you can. As far as I am able to tell, all the verification step does is remove the "unverified app" screen. As long as you click Advanced > Go To ... (unsafe), you should be able to create and edit calendar events for that user in your application.
In order to be able to create and edit calendar events, you need to use the most sensitive scope, which is https://www.googleapis.com/auth/calendar. I couldn't figure out how to edit and create calendar events in my web app until I changed my scope from calendar.events to calendar.
Creating Events: https://developers.google.com/calendar/create-events

Gsuite Marketplace publish process: 404 error

Looking into building some Gsuite Marketplace apps, but we have having issues at the publish time already.
Publishing an app following these steps makes the app to be accessible from the Chrome Marketplace.
(e.g. https://chrome.google.com/webstore/detail/qwertzuiopasdfghjkl/publish-accepted)
Using Chrome web store app link (e.g. https://chrome.google.com/webstore/detail/app-name/qwertzuiopasdfghjkl)
redirects to a Gsuite link (e.g. https://gsuite.google.com/marketplace/app/qwertzuiopasdfghjkl?pann=cwsdp&hl=en-US) but brings a 404 page.
Waiting seems to do the job (url works after a couple of days - approval)
Changing app type from "Private" to "Unlisted" break it completely; even waiting up to a week, the link never works again.
My questions are:
How do you switch between "Visibility options" without breaking your
app?
How do you guys deal with updating publishing apps on Gsuite
Marketplace and keep it working?
Cheers!
Every new update requires a new installation. So everytime you make changes whether feature or visibility settings, treat it as if you were uploading a new app.
If you change the visibility, it will undergo a review process as if it were a new app.
Users who have already installed your app will still be able to use it.

Parse app for clients

I have made a Parse-based app that allows the user to send a push notification to everyone who downloads the app. It's a kind of quick public address system for a congregation, school, club, etc.
Other leaders have expressed an interest in my app for their communities. But these people are not tech-savvy and have no interest in becoming Apple developers for $100 a year, so building custom apps for them is not an option. Even if I did it for them, I would be concerned that they would mess something up that would require a lot of time on my part to repair. They just want to use the app for their communities.
My question: Could I make custom apps for these groups, keep them on my iTunesConnect account, and simply make a new Parse account for each app? That way, the group leaders would only need to know how to log into Parse and send a push notification on the Parse website.
Thank you,
Eli
You could. It could be done with a single app that everyone downloads and then configures to connect it to their specific parse app.
It's possible that you could write the app so it doesn't know the parse account details and they need to be entered on the device. It's also possible that you could supply that detail with an invite e-mail that opens the app and has the details in the URL query.

Resources