Skip to content

HTTP Request Customization in React Native

For the React Native platform, you can use FaceSDK.setRequestHeaders() function which accepts a map of strings.

If you want to intercept HTTP requests, make sure to use setRequestHeaders before startLiveness or matchFaces:

var authorization = "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJmYWNlLXNkayI6IkhhdmUgYSBncmVhdCBkYXkhIn0.IPoW0D0LnMv_pL4U22MuIhDNGIdK34TaHhqhKBAaBEs"
FaceSDK.setRequestHeaders({ "Authorization": authorization })