get session token on angular client
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2017 01:10 PM
I am working with angular and would like to get the session token. I tried using g_user but that didnt help. How to get the session token on client side ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2017 04:46 PM
In Service Portal the client side and server side can communicate with each other very easily. Is there a specific reason why it has to start at the client side?
Example of getting the session id from server script to client script in a widget:
Server side Script:
data.sessionID = gs.getSessionID();
Client Side:
c.sessionID = c.data.sessionID;
or if you bring in $scope and are not using c
$scope.sessionID = $scope.data.sessionID;
in the HTML markup
if you're using c
<p> {{ c.data.sessionID }} </p>
or if not
<p>{{ data.sessionID }}</p>
Hopefully that helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2017 04:51 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2017 04:56 PM
I guess I have Service Portal on my mind. But I see Karan just specifically said "angular".
Thanks Josh for pointing out the article.