This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions icon

FHIR Infrastructure icon Work Group Maturity Level: 2Trial Use Compartments: N/A

This operation is used to get a token for a websocket client to use in order to bind to one or more subscriptions.

The canonical URL for this operation definition is


Formal Definition (as a OperationDefinition).

URL: [base]/Subscription/$get-ws-binding-token

URL: [base]/Subscription/[id]/$get-ws-binding-token

This is not an idempotent operation

In Parameters:

At the Instance level, this parameter is ignored. At the Resource level, one or more parameters containing a FHIR id for a Subscription to get a token for. In the absence of any specified ids, the server may either return a token for all Subscriptions available to the caller with a channel-type of websocket or fail the request.

Out Parameters:

An access token that a client may use to show authorization during a websocket connection. The security details of the token are implementation-dependent and beyond the scope of this operation definition.


The date and time this token is valid until.


The subscriptions this token is valid for.


The URL the client should use to connect to Websockets.

Request: Request a websocket binding token for Subscription ABC123

GET [base]/Subscription/ABC123/$get-ws-binding-token

Response: Returned on successful evaluation

HTTP/1.1 200 OK

<?xml version="1.0" encoding="UTF-8" ?>

<Parameters xmlns="http://hl7.org/fhir">
  <id value="2774a842-9feb-437c-a768-7c353c0a37f6"/>
    <name value="token"/>
    <valueString value="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IndlYnNvY2tldCB0b2tlbiIsImlhdCI6MTUxNjIzOTAyMn0.Ti55Tbdt3Ub_I6_kDw8byL4Jn5DQwwJIXt188HggzEw"/>
    <name value="expiration"/>
    <valueDateTime value="2020-01-17T19:30:22-05:00"/>
    <name value="subscription"/>
    <valueString value="ABC123"/>
    <name value="websocket-url"/>
    <valueUrl value="wss://example.org/fhir/R5/subscription-websocket"/>


For more information about operations, including how they are invoked, see Operations.