Request Authentication
Authorization: Bearer e5c3b842231543f.mGCUhfi0uI4J13k010V49D2GaBZ3j1E708X4a4396XNx48X31
SDK User Token
Sentiance.shared.requestUserAccessToken { result, error in
if let result = result {
print("Token: \(result.token)")
}
}sentiance.requestUserAccessToken().addOnCompleteListener { operation ->
if (operation.isSuccessful) {
val token = operation.result
} else {
val error = operation.error
Log.e(TAG, "Failed to get access token, reason ${error.reason.name}.")
}
}try {
final tokenResult = await requestAccessToken(options);
//
} on PlatformException catch(e) {
// An error occurs when communicating with the host platform.
} on UserAccessTokenError catch(e) {
// Failed to request a user access token, find out more about the reason why
final reason = e.reason;
}Last updated