I am trying to figure out a way to get user information like userId or email address of the student when student clicks on the tool link or after authentication is done using REST API. Can anyone help me with this?
As part of the OAuth process you get an access_token. You can use this to make API calls. To get user information call the get user endpoint:
See Explore APIs
Bansari Barot, you need to change your grant_credentials when calling /token to authorization_code. Then you get a user_id field in the response and if you call the hidden API /users/me with just the authorization token you get the authenticated users profile.
Retrieving data ...