Get Logged-in User

Get Logged-in Userkintone.getLoginUser

Retrieves the user information of the user that is currently viewing the page.

Function

kintone.getLoginUser

Parameters

PARAMETER TYPE VALUE & DESCRIPTION
id String User ID. Auto incremented by the service.
code String Login name. For guest users, this will be their email.
name String Display name.
email String E-mail Address.
url String URL. Blank for guest users.
employeeNumber String Employee ID. Blank for guest users.
phone String Phone.
mobilePhone String Mobile Phone. Blank for guest uers.
extensionNumber String Extension. Blank for guest users.
timezone String Time Zone.
isGuest Boolean True for guest users, false for non-guest users.
language String Language selected in the Language & Time Zone settings
  • en: English
  • ja: Japanese
  • zh: Chinese
If the user has selected "Use Web browser settings", the returned string will be dependant on their browser.

Sample

var user = kintone.getLoginUser();
console.log(user);
 
// Sample response
{
  'id': '7',
  'code': 'john-d',
  'name': 'John Doe',
  'email': 'johndoe@kintone.com',
  'url': 'http://www.kintone.com',
  'employeeNumber': '100',
  'phone': '415-000-0000',
  'mobilePhone': '400-000-0000',
  'extensionNumber': '1001',
  'timezone': 'America/Los_Angeles',
  'isGuest': false
  'language': 'en'
}

Limitations

  • This API can be used on any page.
  • This API can be used on both Desktops and Smartphones.
  • This API cannot be initiated from apps attached to bodies of Spaces/Threads/Announcements.
Was this article helpful?
0 out of 0 found this helpful
Comments
Please sign in to leave a comment.