POST /users/{userId}/link

Creates a short-lived (24 hours), single-use device linking session. Use the returned linkUrl to present Link UI to your user via mobile in-app browsers or web redirects, or use the linkToken to present Link UI via the Link SDKs.

Servers

Path parameters

Name Type Required Description
userId String Yes

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
scopes[] Array Yes

The scope(s) you wish to request access to when linking an asset (learn more). The scopes will be presented for user consent in Link UI in the review data access step. The <assetType>:read:data scope is required for any asset type (e.g. if you wish to link a battery, you must request battery:read:data).

vendor Object No

By specifying a vendor, the brand selection step in Link UI will be skipped. Instead, your user will go directly to the service selection view (if applicable for the specified vendor), or to the review data access step.

vendorType Object No
redirectUri String Yes

The URI your user will be redirected to after clicking "Complete" at the linking flow (from the last step in the Link UI flow). Only used in Link UI sessions that were not opened via the Link SDKs.

colorScheme String No

Sets the color scheme (light or dark) of Link UI. If your UI is only available in one of the color schemes, and does not follow the operating system color scheme, we recommend setting either light or dark. Defaults to system, which follows the users operating system settings.

Possible values:

  • "system"
  • "light"
  • "dark"

Default value: "system"

language String Yes

Sets the language for Link UI. We recommend matching this to the language of your application. If your language is not yet supported, you can specify browser which will assess your user's browser language via the Accept-Language header (learn more). Passing in browser will fall back to en-US if no match is found.

Possible values:

  • "browser"
  • "es-ES"
  • "lt-LT"
  • "nl-BE"
  • "lv-LV"
  • "nl-NL"
  • "fi-FI"
  • "da-DK"
  • "fr-FR"
  • "nb-NO"
  • "de-DE"
  • "sv-SE"
  • "it-IT"
  • "en-US"
  • "en-GB"
  • "ro-RO"
  • "pt-PT"

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.