@@ -277,6 +277,21 @@ export type IntercomType = {
277277 */
278278 setUserJwt ( jwt : string ) : Promise < boolean > ;
279279
280+ /**
281+ * Provide Intercom with your auth tokens which can be used for functionality
282+ * such as Custom Actions with Data Connectors. You can provide multiple tokens at once. To create tokens:
283+ * 1. Go to Settings > Integrations > Authentication in your Intercom workspace
284+ * 2. Create a new token with "User" type
285+ * 3. Configure the token prefix and header as needed
286+ * Learn more: https://www.intercom.com/help/en/articles/6615543-setting-up-data-connectors-authentication
287+ *
288+ * This should be called after any user login takes place.
289+ *
290+ * @param authTokens An object containing auth token names and values (e.g., { security_token: "jwt_here" })
291+ * @return {Promise<boolean> } A promise that resolves to true on success.
292+ */
293+ setAuthTokens ( authTokens : { [ key : string ] : string } ) : Promise < boolean > ;
294+
280295 /**
281296 * [Android Only] Bootstrap event listeners for Android. Call this before setting up your own NativeEventEmitter
282297 *
@@ -332,6 +347,7 @@ const Intercom: IntercomType = {
332347 setLogLevel : ( logLevel ) => IntercomModule . setLogLevel ( logLevel ) ,
333348 setThemeMode : ( themeMode ) => IntercomModule . setThemeMode ( themeMode ) ,
334349 setUserJwt : ( jwt ) => IntercomModule . setUserJwt ( jwt ) ,
350+ setAuthTokens : ( authTokens ) => IntercomModule . setAuthTokens ( authTokens ) ,
335351
336352 bootstrapEventListeners : ( ) => {
337353 if ( Platform . OS === 'android' && IntercomEventEmitter ?. startEventListener ) {
0 commit comments