User information
kintone.getLoginUser()
kintone.getLoginUser()
Returns information about the currently logged-in user. Works for both regular and guest users.Available pages: All pages (desktop and mobile), including the plug-in settings page
Parameters
NoneReturn value
Returns an object with the following properties:| Property | Type | Description |
|---|---|---|
id | string | System-assigned user ID |
code | string | Login name. For guest users, this is the email address. |
name | string | Display name. For guest users, this is the user’s name. |
email | string | Email address |
url | string | Profile URL. Empty string for guest users. |
employeeNumber | string | Employee ID. Empty string for guest users. |
phone | string | Phone number |
mobilePhone | string | Mobile phone number. Empty string for guest users. |
extensionNumber | string | Extension number. Empty string for guest users. |
timezone | string | User’s timezone |
isGuest | boolean | true if the user is a guest user |
language | string | User’s display language: ja, en, zh, zh-TW, es, pt-BR, th. Unsupported locales return en. |
Example
kintone.user.getCustomFields(code)
kintone.user.getCustomFields(code)
Returns the custom profile fields configured for a user. When retrieving fields for the currently logged-in user, private fields are also returned.Available pages: All pages (desktop and mobile). Not available on search, app store, or plug-in settings pages.
This is an async API that returns a Promise.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | No | Login name of the user whose fields to retrieve. Omit to retrieve the logged-in user’s fields. |
Return value
Returns a Promise that resolves to an array of objects:| Property | Type | Description |
|---|---|---|
code | string | Field code |
name | string | Field label |
type | string | Field type: SINGLE_LINE_TEXT or USER_SELECT |
value | string | object | Saved value. String for SINGLE_LINE_TEXT; object for USER_SELECT. |
value.code | string | User code (only for USER_SELECT type) |
value.name | string | User display name (only for USER_SELECT type) |
visibility | string | PUBLIC or PRIVATE |
Example
kintone.user.getGroups(code)
kintone.user.getGroups(code)
Returns the groups (roles) that a user belongs to. When called from a guest space, only
Everyone and Administrator groups are returned.Available pages: All pages (desktop and mobile). Not available on search, app store, or plug-in settings pages.This is an async API that returns a Promise.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | No | Login name of the user whose groups to retrieve. Omit to retrieve the logged-in user’s groups. |
Return value
Returns a Promise that resolves to an array of objects:| Property | Type | Description |
|---|---|---|
id | string | Group ID |
code | string | Group code |
name | string | Group name |
Example
kintone.user.getOrganizations(code)
kintone.user.getOrganizations(code)
Returns the departments (organizations) that a user belongs to, including their title within each department. Values for fields that support multiple languages are returned in the language of the logged-in user.Available pages: All pages (desktop and mobile). Not available on search, app store, or plug-in settings pages.
This is an async API that returns a Promise.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | No | Login name of the user whose departments to retrieve. Omit to retrieve the logged-in user’s departments. |
Return value
Returns a Promise that resolves to an array of objects:| Property | Type | Description |
|---|---|---|
organization.id | string | Department ID |
organization.code | string | Department code |
organization.name | string | Department name |
organization.primary | boolean | true if this is the user’s primary department |
title | object | null | The user’s title within the department. null if not set. |
title.id | string | Title ID |
title.code | string | Title code |
title.name | string | Title name |
Example
kintone.user.getPageType()
kintone.user.getPageType()
Environment information
kintone.getUiVersion()
kintone.getUiVersion()
Returns the UI design version of the current page. Use this to detect whether the user is running the legacy or the revamped Kintone UI.Available pages: All pages (desktop and mobile), including the plug-in settings page
Parameters
NoneReturn value
| Type | Description |
|---|---|
| number | 1 — legacy desktop UI or mobile; 2 — revamped desktop UI |
Example
kintone.getAvailableServices()
kintone.getAvailableServices()
Returns which other cybozu.com services are available in the current environment.Available pages: All pages (desktop and mobile). Not available on search, app store, or plug-in settings pages.
This is an async API that returns a Promise.
Parameters
NoneReturn value
Returns a Promise that resolves to an object:| Property | Type | Description |
|---|---|---|
garoon | boolean | true if Garoon is available |
office | boolean | true if Cybozu Office is available |
mailwise | boolean | true if Mailwise is available |
Example
kintone.getDomain()
kintone.getDomain()
Returns the domain information for the current Kintone environment.Available pages: All pages (desktop and mobile), including the plug-in settings page. Not available on search or app store pages.
This is an async API that returns a Promise.
Parameters
NoneReturn value
Returns a Promise that resolves to an object:| Property | Type | Description |
|---|---|---|
subdomain | string | The subdomain name |
baseDomain | string | The base domain: cybozu.com, cybozu.cn, or kintone.com |
Example
kintone.getAvailableApiTypes()
kintone.getAvailableApiTypes()
Returns which API types are available in the current environment. Use this to detect whether the Wide Plan APIs are available.Available pages: All pages (desktop and mobile), including the plug-in settings page. Not available on search or app store pages.
This is an async API that returns a Promise.
Parameters
NoneReturn value
Returns a Promise that resolves to an array of strings. Order is not guaranteed.| Value | Description |
|---|---|
CORE | Generally available APIs |
WIDE | APIs exclusive to the Wide Plan |
Example
kintone.isAccessWithClientCertificateAuthentication()
kintone.isAccessWithClientCertificateAuthentication()
kintone.isMobileApp()
kintone.isMobileApp()
kintone.isMobilePage()
kintone.isMobilePage()
kintone.getUserPreference()
kintone.getUserPreference()
kintone.isUsersAndSystemAdministrator()
kintone.isUsersAndSystemAdministrator()
Dialogs and notifications
kintone.showConfirmDialog(options)
kintone.showConfirmDialog(options)
Displays a confirmation dialog with OK and Cancel buttons.Available pages: Desktop only. Not available on search or app store pages.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options | object | Yes | Dialog configuration |
options.title | string | No | Dialog title |
options.message | string | No | Dialog body message |
Return value
| Type | Description |
|---|---|
| Promise<string> | Resolves with OK or CANCEL based on the user’s selection |
Example
kintone.createDialog(options)
kintone.createDialog(options)
Creates a fully customizable dialog. The dialog content is defined by a DOM element you provide, giving you full control over the layout and interaction.Available pages: Desktop only. Not available on search or app store pages.
This is an async API that returns a Promise.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options | object | Yes | Dialog configuration |
options.title | string | No | Dialog title. Omitted if not set. |
options.body | Element | No | DOM element to render as the dialog body. Omitted if not set. |
options.showOkButton | boolean | No | Show an OK button. Defaults to true. |
options.okButtonText | string | No | Label for the OK button. Defaults to the localized “OK”. |
options.showCancelButton | boolean | No | Show a Cancel button. Defaults to false. |
options.cancelButtonText | string | No | Label for the Cancel button. Defaults to the localized “Cancel”. |
options.showCloseButton | boolean | No | Show a close (X) button. Defaults to false. When false, the Escape key is also disabled. |
options.beforeClose | function | No | Callback invoked before the dialog closes. Receives one of OK, CANCEL, or CLOSE. Return false (or a Promise resolving to false) to prevent the dialog from closing. |
Return value
Returns a Promise that resolves to an object:| Property | Type | Description |
|---|---|---|
show | function | Async function that displays the dialog. Returns a Promise that resolves with the user’s action: OK, CANCEL, CLOSE, or FUNCTION. |
close | function | Closes the dialog programmatically. No arguments or return value. |
Example
kintone.showNotification(options)
kintone.showNotification(options)
Displays a brief notification message to the user.Available pages: Desktop only. Not available on search or app store pages.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options | object | Yes | Notification configuration |
options.text | string | Yes | The message to display |
options.type | string | No | Notification style: success, danger, or infoDialog |
Return value
undefinedExample
Page navigation
kintone.buildPageUrl(page, params)
kintone.buildPageUrl(page, params)
Generates a Kintone page URL. Guest space app pages automatically receive the correct guest space URL format. Use this instead of constructing URLs by hand.Available pages: All pages (desktop and mobile). Not available on search, app store, or plug-in settings pages.
This is an async API that returns a Promise. Response data is cached until the next page navigation. Exceeding 50 server requests per user per minute will cause the Promise to be rejected.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | string | Yes | Page type identifier. See the table below for valid values. |
params | object | Yes | Parameters used to build the URL |
params.appId | string | Conditional | App ID. Required for all app pages. |
params.recordId | string | Conditional | Record ID. Required for detail, edit, and print pages. |
params.viewId | string | No | View ID. Optional for list pages. |
params.reportId | string | Conditional | Graph ID. Required for graph pages. |
params.spaceId | string | Conditional | Space ID. Required for space pages. |
params.threadId | string | Conditional | Thread ID. Required for space thread pages. |
params.userCode | string | Conditional | User login name. Required for People and Message pages. |
Page type values
| Value | Description |
|---|---|
APP_INDEX | Record list (desktop) |
APP_CREATE | Record create (desktop) |
APP_DETAIL | Record detail (desktop) |
APP_EDIT | Record edit (desktop) |
APP_PRINT | Record print (desktop) |
APP_REPORT | Graph (desktop) |
APP_INDEX_MOBILE | Record list (mobile) |
APP_CREATE_MOBILE | Record create (mobile) |
APP_DETAIL_MOBILE | Record detail (mobile) |
APP_EDIT_MOBILE | Record edit (mobile) |
APP_REPORT_MOBILE | Graph (mobile) |
PORTAL_TOP | Portal (desktop) |
PORTAL_TOP_MOBILE | Portal (mobile) |
SPACE_PORTAL | Space portal (desktop) |
SPACE_THREAD | Space thread (desktop) |
SPACE_PORTAL_MOBILE | Space portal (mobile) |
SPACE_THREAD_MOBILE | Space thread (mobile) |
PEOPLE_TOP | People profile (desktop) |
PEOPLE_TOP_MOBILE | People profile (mobile) |
MESSAGE_TOP | Message (desktop) |
MESSAGE_TOP_MOBILE | Message (mobile) |
SEARCH_TOP | Search (desktop) |
SEARCH_TOP_MOBILE | Search (mobile) |
NOTIFICATION_TOP | Notifications (desktop) |
APP_MARKETPLACE_TOP | App store (desktop) |
Return value
Returns a Promise that resolves to a string containing the full page URL.Example
Keyboard shortcuts
kintone.setKeyboardShortcuts(shortcuts)
kintone.setKeyboardShortcuts(shortcuts)
Enables or disables specific keyboard shortcuts on the current page.Available pages: Desktop only. Available on record list, detail, create, and edit pages.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
shortcuts | object | Yes | An object where each key is a shortcut name and each value is a boolean to enable (true) or disable (false) it |
Return value
undefinedExample
kintone.getKeyboardShortcuts()
kintone.getKeyboardShortcuts()
Returns the current enabled/disabled state of all keyboard shortcuts available on the current page.Available pages: Desktop only. Available on record list, detail, create, and edit pages.
This is an async API that returns a Promise.
Parameters
NoneReturn value
Returns a Promise that resolves to an object where each key is a shortcut name and each value is a boolean indicating whether the shortcut is enabled. The shortcut names match the keys used inkintone.setKeyboardShortcuts().Example
Related
- Plug-in APIs — APIs for building and configuring plug-ins
- UI elements — Show, hide, and retrieve DOM elements
- Field visibility — Show or hide form fields