User Credentials

This document refers to deprecated parts of the platform and has been left intact to help customers with legacy integrations. In order to access the latest platform features and documentation, please go to

User credentials allow you to interact with the Sentiance API. You need a token and user to authorize requests and query the right data.

Get User and Token

If the SDK is initialized, you can get the userID and token as follows:

NSString* userId = [[SENTSDK sharedInstance] getUserId];
[[SENTSDK sharedInstance] getUserAccessToken:^(NSString *token) {
    NSString* accessToken = token;
} failure:^{

If the token has expired, the SDK will get a new access token before passing it to the callback.


Generally, this operation will complete instantly by returning a cached access token, but if a new token has to be obtained from the Sentiance API, there is a possibility it will fail.

Specifically, failure in this case can occur if there is no network connection that can be used to communicate with the Sentiance API.

Last updated