1

In IOS, How do I return the current user's parse session token?

Once logged in, I want to return what my current session token is.

NSString *token = [PFUser currentUser] sessionToken;
2
  • I am having trouble finding the api that shows where I can return current session once logged in...I tried [PFSession currentSession] out of pure instinct but it wasnt right Commented Mar 22, 2016 at 14:23
  • and per the API, it says [PFUser sessionToken], but that didnt work either Commented Mar 22, 2016 at 14:29

1 Answer 1

2

Objective-C

NSString *token = [PFUser currentUser].sessionToken;

Swift

let token = PFUser.current().sessionToken
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.