Community.Expo.Server.SDK 1.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Community.Expo.Server.SDK --version 1.2.0                
NuGet\Install-Package Community.Expo.Server.SDK -Version 1.2.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Community.Expo.Server.SDK" Version="1.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Community.Expo.Server.SDK --version 1.2.0                
#r "nuget: Community.Expo.Server.SDK, 1.2.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Community.Expo.Server.SDK as a Cake Addin
#addin nuget:?package=Community.Expo.Server.SDK&version=1.2.0

// Install Community.Expo.Server.SDK as a Cake Tool
#tool nuget:?package=Community.Expo.Server.SDK&version=1.2.0                

community-expo-push-notification-server-sdk

Installation

Install package through NuGet - Community.Expo.Server.SDK

To send requests without access token use version 1.1.2
Since version 1.2.0 access token is required

Usage

Send push notification

	IPushApiClient _client = new PushApiClient("your token here");
	PushTicketRequest pushTicketRequest = new PushTicketRequest()
            {
                PushTo = new List<string>() { ... },
                PushTitle = "TEST 1",
                PushBody = "TEST 1",
                PushChannelId = "test"
            };

	PushTicketResponse result = await _client.SendPushAsync(pushTicketRequest);

If no errors, then wait for a few moments for the notifications to be delivered.
Then request receipts for each push ticket.

Later, after the Expo push notification service has delivered the notifications to Apple or Google (usually quickly, but allow the the service up to 30 minutes when under load),
a "receipt" for each notification is created.
The receipts will be available for at least a day; stale receipts are deleted.

Get push notification receipts

The ID of each receipt is sent back in the response "ticket" for each notification.
In summary, sending a notification produces a ticket, which contains a receipt ID you later use to get the receipt.

The receipts may contain error codes to which you must respond.
In particular, Apple or Google may block apps that continue to send notifications to devices that have blocked notifications or have uninstalled your app.
Expo does not control this policy and sends back the feedback from Apple and Google so you can handle it appropriately.

	IPushApiClient _client = new PushApiClient("your token here");
	PushReceiptRequest pushReceiptRequest = new PushReceiptRequest() { PushTicketIds = new List<string>() { ... } };
	PushReceiptResponse pushReceiptResult = await _client.GetReceiptsAsync(pushReceiptRequest);

	foreach (var pushReceipt in pushReceiptResult.PushTicketReceipts) 
	{
		// handle delivery status, etc
	}

See Also

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.2.2 2,953 6/23/2024
1.2.1.1 20,619 10/11/2022
1.2.1 1,201 8/18/2022
1.2.0.2 608 7/29/2022
1.2.0.1 473 6/22/2022
1.2.0 530 6/9/2022
1.1.2 2,187 3/5/2022
1.1.1 1,011 1/4/2022
1.0.7 4,468 12/22/2021
1.0.6 936 12/3/2021

access token is required