The platform-specific guides below discuss how to initialize Link for first time implementations, or adjust your existing implementation to add new functionalities. For steps on how to update an existing Link implementation to a newer version, visit our Upgrade Guide instead.
For iOS, Android, and React Native implementations, Link SDKs are maintained and updated through Argyle’s public GitHub repository. For Flutter implementations, follow the steps in our Flutter initialization guide below.
Some optional parameters below are configured when creating a session for payroll verification workflows instead of being passed in the initialization code.
Parameter
Type
Description
flowId
string
ID used to customize the Link flow. Saved IDs can be found in the Flows section of Console.
Flow IDs are not environment-specific. The same Flow ID will apply consistent behavior across both Sandbox and Production.
items
array of strings
Limits Link search to the provided list of Items. Providing a single Item in the array will skip Link search and take the user directly to that Item’s login screen.
accountId
string
Used for direct logins to an account that the user has previously connected or attempted to connect.
<Callback Name>
string
Callbacks are activated by specific events in Link.
Hosted Link for payroll verification workflows does not support callbacks.
language
string
Specifies the display language in Link.
EN and ES are available across all platforms and employers
Can be used in combination with other optional initialization parameters including flowId
Certain platform-generated messages (such as multi-factor authentication prompts) will be shown as-received, and depend on the user’s language preferences selected within their platform’s settings.
In Console, you can test Spanish in Sandbox mode by changing the Language dropdown when previewing an Embedded Experiences Link Flow.
Possible values: EN (English), ES (Spanish), RU (Russian), ZH (Chinese). *Flutter uses lowercase en, es, ru, zh.
When using a webview component, make sure localStorage is always enabled, and set domStorageEnabled to true
and incognito to false.
If your security policy limits outgoing traffic, allow API calls by whitelisting outgoing traffic from Link by including these two content sources at minimum:
Pass that value as connectUrl in your Link initialization.
<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <!-- This is needed in order to apply proper scaling on mobile devices --> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> </head> <body> <script src="https://plugin.argyle.com/argyle.web.v5.js"></script> <script type="text/javascript"> const linkInstance = Argyle.create({ connectUrl: 'SESSION_LINK', // (Optional) A few recommended callbacks: onAccountConnected: payload => console.log('onAccountConnected', payload), onAccountError: payload => console.log('onAccountError', payload) }) linkInstance.open() // linkInstance.close() // Manually close Link (typically the user closes Link). </script> </body></html>
Create a user token:
New users: create the user via POST /v2/users and use the returned user_token.
Returning users: create a new token via POST /v2/user-tokens and use the returned user_token.
Initialize Link using the HTML below, replacing the user token.
<!DOCTYPE html><html> <head> <meta charset="utf-8" /> <!-- This is needed in order to apply proper scaling on mobile devices --> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> </head> <body> <script src="https://plugin.argyle.com/argyle.web.v5.js"></script> <script type="text/javascript"> const linkInstance = Argyle.create({ userToken: 'USER_TOKEN', sandbox: true, // Set to false for production environment. // (Optional) Add a Link flow customization created in Console: // flowId: '<ID of the Link flow>', // (Optional) Limit Link search to specific Items: // items: ['item_000001422', 'item_000025742'], // (Optional) Connect directly to an existing account: // accountId: '<ID of the account>', // (Optional) Set a language. Options: EN, ES, RU, ZH // language: 'EN', // (Optional) A few recommended callbacks: onAccountConnected: payload => console.log('onAccountConnected', payload), onAccountError: payload => console.log('onAccountError', payload), onTokenExpired: updateToken => { console.log('onTokenExpired') // Generate a new user token. // updateToken(newToken) } }) linkInstance.open() // linkInstance.close() // Manually close Link (typically the user closes Link). </script> </body></html>
Argyle’s iOS Link SDK provides a way to integrate Link into your iOS app. First-time installation instructions are below. To update versions, visit our iOS Link upgrade guide.
To enhance the multi-factor authentication (MFA) experience of users, the iOS Link SDK supports directly opening the user’s email client.To enable this feature, add the following property to your Info.plist file:
Pass that value as connectUrl in your Link initialization.
var config = LinkConfig( connectUrl: "SESSION_LINK")// (Optional) A few recommended callbacks:config.onAccountConnected = { data in print("Result: onAccountConnected \(data)")}config.onAccountError = { data in print("Result: onAccountError \(data)")}ArgyleLink.start(from: viewController, config: config)// ArgyleLink.close() // Manually close Link (typically the user closes Link).
Create a user token:
New users: create the user via POST /v2/users and use the returned user_token.
Returning users: create a new token via POST /v2/user-tokens and use the returned user_token.
Initialize Link using the configuration below, replacing the user token.
var config = LinkConfig( userToken: "USER_TOKEN", sandbox: true // Set to false for production environment.)// (Optional) Add a Link flow customization created in Console:// config.flowId = "<ID of the Link flow>"// (Optional) Limit Link search to specific Items:// config.items = ["item_000001422", "item_000025742"]// (Optional) Connect directly to an existing account:// config.accountId = "<ID of the account>"// (Optional) Set a language. Options: EN, ES, RU, ZH// config.language = .EN// (Optional) A few recommended callbacks:config.onAccountConnected = { data in print("Result: onAccountConnected \(data)")}config.onAccountError = { data in print("Result: onAccountError \(data)")}config.onTokenExpired = { handler in print("onTokenExpired") // Generate a new user token. // handler(newToken)}ArgyleLink.start(from: viewController, config: config)// ArgyleLink.close() // Manually close Link (typically the user closes Link).
Argyle’s Android Link SDK provides a way to integrate Link into your Android app. First-time installation instructions are below. To update versions, visit our Android Link upgrade guide.
If you are using tools like ProGuard to obfuscate your code...
Make sure to exclude the Link SDK package com.argyle.*. For example, add the following line to the proguard-rules.pro file of your ProGuard configuration:
Pass that value as connectUrl in your Link initialization.
val config = LinkConfig( connectUrl = "SESSION_LINK")// (Optional) A few recommended callbacks:config.onAccountConnected = { data -> Log.d("Result", "onAccountConnected $data")}config.onAccountError = { data -> Log.d("Result", "onAccountError $data")}ArgyleLink.start(context, config)// ArgyleLink.close() // Manually close Link (typically the user closes Link).
Create a user token:
New users: create the user via POST /v2/users and use the returned user_token.
Returning users: create a new token via POST /v2/user-tokens and use the returned user_token.
Initialize Link using the configuration below, replacing the user token.
val config = LinkConfig( userToken = "USER_TOKEN", sandbox = true // Set to false for production environment.)// (Optional) Add a Link flow customization created in Console:// config.flowId = "<ID of the Link flow>"// (Optional) Limit Link search to specific Items:// config.items = listOf("item_000001422", "item_000025742")// (Optional) Connect directly to an existing account:// config.accountId = "<ID of the account>"// (Optional) Set a language. Options: EN, ES, RU, ZH// config.language = Language.EN,// (Optional) A few recommended callbacks:config.onAccountConnected = { data -> Log.d("Result", "onAccountConnected $data")}config.onAccountError = { data -> Log.d("Result", "onAccountError $data")}config.onTokenExpired = { handler -> // Generate a new user token. // handler(newToken)}ArgyleLink.start(context, config)// ArgyleLink.close() // Manually close Link (typically the user closes Link).
Argyle’s React Native Link SDK provides a way to integrate Link into your React Native application. First-time installation instructions are below. To update versions, visit our React Native Link upgrade guide.
In case of runtime issues related to the okhttp3 library...
If you are using tools like ProGuard to obfuscate your code...
Make sure to exclude the Link SDK package com.argyle.*. For example, add the following line to the bottom of your ProGuard configuration:
-keep class com.argyle. { *; }
The Link SDK package currently has a dependency of okhttp3:4.9.2. If your dependencies use an older version (e.g. okhttp3.3.xx) they may need updating to a version that uses okhttp3.4.x.x.Alternatively, you can attempt to force the Link SDK dependency as follows:
Pass that value as connectUrl in your Link initialization.
import { ArgyleLink } from '@argyleio/argyle-plugin-react-native';// ...const config = { connectUrl: 'SESSION_LINK', // (Optional) Callback examples: onAccountConnected: (payload) => console.log('onAccountConnected', payload), onAccountError: (payload) => console.log('onAccountError', payload),};ArgyleLink.start(config);// ArgyleLink.close() // Manually close Link (typically the user closes Link).
Create a user token:
New users: create the user via POST /v2/users and use the returned user_token.
Returning users: create a new token via POST /v2/user-tokens and use the returned user_token.
Initialize Link using the configuration below, replacing the user token.
import { ArgyleLink } from '@argyleio/argyle-plugin-react-native';// ...const config = { userToken: 'USER_TOKEN', sandbox: true, // Set to false for production environment. // (Optional) Add a Link flow customization created in Console: // flowId: '<ID of the Link flow>', // (Optional) Limit Link search to specific Items: // items: ['item_000001422', 'item_000025742'], // (Optional) Connect directly to an existing account: // accountId: '<ID of the account>', // (Optional) Set a language. Options: EN, ES, RU, ZH // language: Language.EN, // (Optional) Callback examples: onAccountConnected: (payload) => console.log('onAccountConnected', payload), onAccountError: (payload) => console.log('onAccountError', payload), onTokenExpired: (updateToken) => { console.log('onTokenExpired'); // Generate a new user token. // updateToken(newToken) },};ArgyleLink.start(config);// ArgyleLink.close() // Manually close Link (typically the user closes Link).
Argyle’s Flutter SDK provides a way to integrate Link into your mobile applications. First-time installation instructions are below. To update versions, visit our Flutter upgrade guide.
Pass that value as connectUrl in your Link initialization.
import 'package:argyle_link_flutter/link_config.dart';// (Required if using callbacks) Callback argument type definitions:import 'package:argyle_link_flutter/account_data.dart';import 'package:argyle_link_flutter/argyle_link.dart';import 'package:argyle_link_flutter/form_data.dart';// ...final config = LinkConfig( connectUrl: 'SESSION_LINK', // (Optional) Callback examples: onAccountConnected: (payload) => debugPrint('onAccountConnected'), onAccountError: (payload) => debugPrint('onAccountError'),);ArgyleLink.start(config);// ArgyleLink.close() // Manually close Link (typically the user closes Link).
Create a user token:
New users: create the user via POST /v2/users and use the returned user_token.
Returning users: create a new token via POST /v2/user-tokens and use the returned user_token.
Initialize Link using the configuration below, replacing the user token.
import 'package:argyle_link_flutter/link_config.dart';// (Required if using callbacks) Callback argument type definitions:import 'package:argyle_link_flutter/account_data.dart';import 'package:argyle_link_flutter/argyle_link.dart';import 'package:argyle_link_flutter/form_data.dart';// ...final config = LinkConfig( userToken: 'USER_TOKEN', sandbox: true, // Set to false for production environment. // (Optional) Add a Link flow customization created in Console: // flowId: '<ID of the Link flow>', // (Optional) Limit Link search to specific Items: // items: ['item_000001422', 'item_000025742'], // (Optional) Connect directly to an existing account: // accountId: '<ID of the account>', // (Optional) Set a language. Options: en, es, ru, zh // language: Language.en, // (Optional) Callback examples: onAccountConnected: (payload) => debugPrint('onAccountConnected'), onAccountError: (payload) => debugPrint('onAccountError'), onTokenExpired: (updateToken) => { debugPrint('onTokenExpired') // Generate a new user token. // updateToken(newToken) },);ArgyleLink.start(config);// ArgyleLink.close() // Manually close Link (typically the user closes Link).