Skip to main content
Junction Link API covers only cloud-based providers.Your mobile app has to manage connections with SDK-based providers — such as Apple HealthKit and Android Health Connect — through the Junction Mobile Health SDK, separately from Junction Link.
You may want to have your own custom Link widget to match your app’s UI. This is useful for customers who don’t want to use Junction Link but still want to use the Junction API. It’s worth ensuring that you have read the Auth Types documentation before proceeding. A full code example in React Native can be seen here. An overview of the process is as follows:
  1. Get a list of all available providers “/v2/providers”
  2. Build your UI using this list of providers
  3. When selecting a provider, generate a link token for that provider “/v2/link/token”
  4. Use the link token to generate an OAuth link, or authorize an email, or email and password.

1. List of all available providers

The first step to creating a custom widget is to make a call to the providers endpoint. This will return a list of all available providers. You can then use this list to build your UI.

2. Build your UI in your app

Once you have a list of all available providers, you can build your UI. You can use the logo field to display the provider’s logo. You can use the name field to display the provider’s name. You can use the supported_resources field to display the resources that the provider supports.
Custom UI

Building a custom UI

Once a user has selected a provider, you can generate a link token. This link token is used to generate an OAuth link, or authorize an email, or email and password. You can read more about the link token here.
Once you have a link token, you can use it to generate an OAuth link, or authorize an email, or email and password.

Connect an OAuth provider

Connect an Email/Password provider

Bringing this all together

Below is an example of how you can bring all of this together to build your own custom widget. This example is in React Native, but the same principles apply to any language.
React Native