Google Apps Script

Class DomainNickname

A Google Apps Domain nickname.

Only Google Apps Domain administrators are allowed to use this class.

Methods

MethodReturn typeBrief description
deleteNickname()voidDeletes the nickname.
getNickname()StringGets the user's nickname.
getUsername()StringGets the username associated to this nickname.

Detailed documentation

deleteNickname()

Deletes the nickname.

 
var nickname = NicknameManager.getNickname("nick");
 nickname.deleteNickname();
 

getNickname()

Gets the user's nickname.

 
// Logs all the nicknames in the domain.
 var nicknames = NicknameManager.getAllNicknames();
 for (var i in nicknames) {
   var nick = nicknames[i];
   Logger.log(i + ": " + nick.getNickname());
 }
 

Return

String — the user's nickname


getUsername()

Gets the username associated to this nickname.

 
var nickname = NicknameManager.getNickname("nick");
 var username = nickname.getUsername();
 

Return

String — the username associated to this nickname

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.