I had the same problem. In my case, the problem was that I installed restClient before which was connected to the user. In this case, userId is not set, and the token is invalid.
My recipient for restClient now looks like this:
- (DBRestClient *)restClient { if (_restClient == nil) { if ( [[DBSession sharedSession].userIds count] ) { _restClient = [[DBRestClient alloc] initWithSession:[DBSession sharedSession]]; _restClient.delegate = self; } } return _restClient; }
source share