App Invites

App Invites provide a powerful way to organically grow your app, user-to-user. Your users recommend your app to their friends using personalized, contextual invitations powered by Google. App Invites provide a great onboarding experience to your new users. Google optimizes your app install rates by reducing friction and using relevant context at every step of the user invitation flow.

Warning: Described API can be used only with active connection to the Google Play Service.

You main find out more about App Invite at

App Invites flow

The App Invites flow always begins with a user sending an invite from your app. The following diagram illustrates the App Invites flow.


The following sections describe each aspect of the process illustrated above.

Send an invitation

You allow a user to send an invitation from your application by building an invitation using the GP_AppInviteBuilder class. The intent must include a title and can also include a message and deep link data.

Launching the invitation intent  with GP_AppInvitesController  opens the contact chooser screen where the user selects the contacts to invite. The invite can be sent via email or SMS. Code snippet can be found bellow.

private void SendInvitation() {
	GP_AppInviteBuilder builder =  new GP_AppInviteBuilder("Test Title");
	builder.SetMessage("Test Message");
	builder.SetCallToActionText("Test Text");

	GP_AppInvitesController.ActionAppInvitesSent += HandleActionAppInvitesSent;

void HandleActionAppInvitesSent (GP_SendAppInvitesResult res) {
	if(res.IsSucceeded) {
		Debug.Log("Invitation was sent to " + res.InvitationIds.Length + " people");
	} else {
		Debug.Log("App invite failed" + res.Message);

	GP_AppInvitesController.ActionAppInvitesSent -= HandleActionAppInvitesSent;

The ActionAppInvitesSent action will come with the GP_SendAppInvitesResult, which will have invitations id's of sent invites. You can store those id's on your server, for example if you want to reward this user after his friend will accept the invite.

I would recommend implementing the reward logic only if you have your own game server. And do this only if invited user has installed an app from the Google Play. Since currently App Invites API allows to sent unlimited number of invites to any user from your contact list, even if this user has already installed an app.

Receive an invitation

When a user receives and clicks an invitation, the invitation flow branches according to whether or not your app is already installed on the recipient's device.

  • App is already installed - If the recipient has already installed your app, the app will receive an Intent containing the optional deep link data.
  • App is not installed - If the recipient has not yet installed the app, they can choose to install the app from the Google Play Store. On first launch, the app will receive an Intent containing the optional deep link data.

You may find out if an app was installed by the invitation by requesting invitation data. Please note that  you can get an invitation data only once. After first invitation data is retrived it will be cleared by Google Play API. You can use this data for  the record, or if you want to reward a user who sent the invite. See the code snippet bellow:

private void GetInvitation() {
	GP_AppInvitesController.ActionAppInviteRetrieved += HandleActionAppInviteRetrieved;

void HandleActionAppInviteRetrieved (GP_RetrieveAppInviteResult res) {
	GP_AppInvitesController.ActionAppInviteRetrieved -= HandleActionAppInviteRetrieved;

	if(res.IsSucceeded) {
		Debug.Log("Invitation Retrieved");

		GP_AppInvite invite = res.AppInvite;
		Debug.Log("Invitation Id: " + invite.Id);
		Debug.Log("Invitation Deep Link: " + invite.DeepLink);
		Debug.Log("Is Opened From PlayStore: " + invite.IsOpenedFromPlayStore);
	} else {
		Debug.Log("No invitation data found");

API Reference


public class GP_AppInvitesController : SA_Singleton<GP_AppInvitesController> {

	static event Action<GP_SendAppInvitesResult> ActionAppInvitesSent;
	static event Action<GP_RetrieveAppInviteResult> ActionAppInviteRetrieved;

	/// Opens the contact chooser where the user selects the contacts to invite.
	/// builder - GP_AppInviteBuilder builder object used to build invitation intent
    void StartInvitationDialog(GP_AppInviteBuilder builder);

	/// Get the invitation data, if app was downloaded by invitation.
	/// autoLaunchDeepLink - If true, launch the app with the deep link set as the data of the launch intent if initial install.
	void GetInvitation(bool autoLaunchDeepLink);


public class GP_AppInviteBuilder  {

	//App invite invitation builder. Set's tittle of the invitation activity
	GP_AppInviteBuilder(string title);

	//Sets the invite message that is sent to all invitees. 
	void SetMessage(string msg);
	//Sets the deep link that is made available to the app when opened from the invitation. This deep link is made available both to a newly installed application and an already installed application. The deep link can be sent to Android and other platforms so should be formatted to support deep links across platforms.
	void SetDeepLink(string url);
	//Text shown on the email invitation for the user to accept the invitation. Default install text used if not set.
	void SetCallToActionText(string actionText);
	void SetGoogleAnalyticsTrackingId(string trackingId);

	//Sets the minimum version of the android app installed on the receiving device. If this minimum version is not installed then the install flow will be triggered.
	void SetAndroidMinimumVersionCode(int versionCode);

	//Adds query parameters to the play store referral URL when the app needs additional referral parameters for other application component referrals. These parameters are added to the referral URL sent from the play store and are available to be processed by other application components, for example Google Analytics. The parameters are set as name, value pairs that will be set as query parameter name and value on the referral URL.
	void SetAdditionalReferralParameters(Dictionary<string, string> referralParameters);


public class GP_AppInvite  {
	public string Id {get;}
	public string DeepLink{get;}
	public bool IsOpenedFromPlayStore{get;}


public class GP_SendAppInvitesResult : GooglePlayResult {
    //Id's of sent invitations
	public string[] InvitationIds {get;}


public class GP_RetrieveAppInviteResult : GooglePlayResult {

    //Loaded invite object. Object is null if result is failed
	public GP_AppInvite AppInvite{get;}