AllocateConnectPackageId Method

Allocates a package ID within HealthVault and returns it.

Namespace: Microsoft.Health
Assembly: Microsoft.Health (in Microsoft.Health.dll) Version: (1.15.1003.9505)

static String^ AllocateConnectPackageId(
	OfflineWebApplicationConnection^ connection


Type: Microsoft.Health.Web..::..OfflineWebApplicationConnection
The HealthVault connection to use for the operation.

Return Value

A token that the application must give to the patient to use when validating the connection request.

The package ID is allocated as a place holder for information that is identifiable but not yet available through the HealthVault service. The returned package ID token should be stored or given to a patient, then used in a call to CreateConnectPackage() to send the package data to the HealthVault service.

The package ID is not a GUID. It uses a shorter format that is more convenient for offline delivery and manual data entry. The HealthVault service guarantees that each package ID is unique for the lifetime of the package. Once the package has been accepted by the patient using the HealthVault Shell, or explicitly deleted using the API, the package ID is deallocated and may be reused.

System..::..ArgumentNullException If connection is null.
Microsoft.Health..::..HealthServiceException If an error occurs when contacting HealthVault.