Skip to main content

Invite a member to join a consortium

To invite another member to join a Quorum Blockchain Service (QBS) consortium, send an invite using the QBS management API, specifying the Azure subscription ID and email address of the party to be invited, and the role of the invited participant within the consortium (OWNER or MEMBER).

The invitee receives an email containing a personal invitation code to use when they provision their QBS member in Azure.

After the invitee provisions the QBS member using the code, QBS peers the inviter's and invitee's members together using an Azure VNet, enabling the two QBS members to securely communicate with one another and share the ledger.

Send an invite

To invite another member to join an existing consortium, use the POST method on the Invites endpoint of the API.

API endpoint for sending an invite to join a consortium

The URI of the Invites endpoint is:

/subscriptions/{inviterSubscriptionId}/resourceGroups/{inviterResourceGroupName}/providers/ConsenSys.Blockchain/blockchainMembers/{inviterBlockchainMemberName}/invites

This endpoint requires the following parameters:

  • {inviterSubscriptionId} - Subscription ID.
  • {inviterResourceGroupName} - Resource group name.
  • {inviterBlockchainMemberName} - Managed app name of the owner of the consortium to join.

The POST request body contains the invitee details:

  • inviteeSubscriptionId - Azure Subscription ID of the member being invited to join the consortium.
  • inviteeEmail - Email address of the member invited to join the consortium. It can't be the same as the inviter.
  • inviteeRole - Role of the member invited to join the consortium (OWNER or MEMBER).
  • expireInDays - Number of days before invite expires.
  • inviterEmail - Your own email to get cc'd a copy of the invite. Use null to leave blank.
{
"inviteeSubscriptionId": "{inviteeSubscriptionId}",
"inviteeEmail": "member@fabrikham.com",
"inviteeRole": "MEMBER",
"expireInDays": 10,
"inviterEmail": "member@contoso.com"
}

On successful completion of the request, the returned value in the response from the Invites endpoint contains the following information:

  • inviteCode - The invitation code to use to join an existing consortium.
  • inviterConsortium - The name of the consortium to join.
  • inviterMember - The name of the member inviting to join their consortium. Technically, this is the name of the QBS managed app in Azure.
  • inviteeSubscription - Azure subscription ID of the member invited to join the consortium.
  • inviteeRole - Role of the member invited to join the consortium (OWNER or MEMBER).
  • inviteeEmail - Email address of the member invited to join the consortium.

The response JSON payload has the following format:

{
"inviteCode": "string",
"inviterConsortium": "string",
"inviterMember": "string",
"inviteeSubscription": "string",
"inviteeRole": "string",
"inviteeEmail": "string",
"inviterEmail": "string",
"status": "string",
"createdTimestamp": "string",
"updatedTimestamp": "string",
"expiryTimestamp": "string"
}

Try the API

You can execute the API method directly on the QBS management API website. First, authorize your access to the API by selecting Authorize at the top of the page.

Authorize API screenshot

In the dialog window with the available authorization methods, you can choose whether you want to authorize access to the API via an Azure Active Directory (AAD) account, or with a bearer token. Because you're interacting with the Swagger UI for the QBS API, we recommend authorizing via AAD. We recommend using a bearer token when you use the API programmatically.

Select Authorize for the AADToken option to authorize access to the API.

Authorize API screenshot

You're prompted to sign in with your corporate account. Enter the same credentials you use to sign into the Azure portal. Once completed, you're redirected to the authorization window. You can now close the dialog window and return to the API list.

Authorize API screenshot

Select Try out to test the API. The parameter fields unlock, allowing you to enter the required values.

Authorize API screenshot

You can find the required information in the Overview section of the QBS managed app in the Azure Portal.

  • Inviter Subscription Id is the Subscription ID.
  • Inviter Resource group of their Managed Application is the Resource group.
  • Inviter Member name is the name of the managed app itself.

Authorize API screenshot

The following video demonstrates how to interact with the Swagger UI and send an invite.

type:video

Try the API programmatically

You can also use execute the API method programmatically. The following code snippets show examples of how to invoke the API in a variety of programming languages.

curl -X POST https://management.onquorum.net/subscriptions/{inviterSubscriptionId}/resourceGroups/QbsContosoGroup/providers/ConsenSys.Blockchain/blockchainMembers/QbsContosoApp/invites
-H 'Content-Type: application/json'
-d '{ "inviteeSubscriptionId": "{inviteeSubscriptionId}", "inviteeEmail": "member@fabrikham.com", "inviteeRole": "MEMBER", "expireInDays": 10, "inviterEmail": "member@contoso.com" }'