Get current user email


can someone give me a hint on how to get the Email of the current user?

For example, using embedded Form you can get the current user Name by this:

$scope.userName = $;

Hi @kok,
Try below snip of code.

<script cam-script type="text/form-script">
inject([ '$rootScope', '$scope', 'camAPI', function($rootScope, $scope, camAPI) {

	var userName = $;
	var User = camAPI.resource('user');

	User.profile({id: userName}, function(err, data) {
		if (!err) {
			//alert('Data: ' + JSON.stringify(data));
			alert('Email: ' +;
1 Like

Hi @hassang,

thank you for your response. The truth is, I don’t know how to use this code. I tried to google it but it didn’t work.

I was thinking about fetching the current user email, like in this example:

hopefully i could explain my problem.