Documents for Password authentication and API token authentication for your REST API requests.
When using the REST APIs, an authorization header will be required. There are two main ways to authenticate when using REST APIs. Using password authentication allows the use of REST APIs with user-level permission, meaning that the authenticated user will need to have permission to control the App or space for the API to succeed. The other option is using API tokens to manipulate Apps with REST APIs. Each App in Kintone can create API tokens that will work specifically with that App. Other authentication methods, session authentication and OAuth authentication will also be briefly discussed.
X-Cybozu-Authorization is placed in the request header with a BASE64 encoded login name and password. BASE64 encode is done in the following format: Log_in_name:password.
For example, for a login name of “kintone” and a password of “developer”, BASE64 encode “kintone:developer” and add this to the header:
API token authentication
Each App in Kintone can generate API tokens through the Advanced Settings in the App’s settings menu. Refer to the Generating an API Token article from the Kintone Help for information on generating API tokens from an App.
X-Cybozu-API-Token is placed in the request header with the API Token. If the generated API token of the app is “9wOomr3kpP9d1JS34Uyz72xqQ1pLI4PkcziRFTuZ”, add the following to the header:
Multiple API Tokens may be used in the case of performing REST API operations involving Lookup fields or Related Record fields. Specify the API Tokens in the header like so, with a comma in between:
The same effect may also be achieved by writing the API Tokens in two separate headers.
- Each App can generate up to 20 API Tokens.
- REST APIs initiated with API Tokens will be recorded in Kintone as operations done by the user named Administrator.
- Note that the X-Cybozu-Authorization header will be prioritized over this authentication.
- API Token authentication is applicable for the following Kintone REST APIs:
- Get Record
/ Add Record
/ Update Record
(To create/update values of Lookup fields, place multiple API Tokens in the header )
- Get Records / Add Records / Update Records / Delete Records
- Get Cursor / Add Cursor / Delete Cursor
- Get Comments / Add Comment / Delete Comment
- Bulk Request
- Update Status
- Update Statuses
- Update Assignees
- Get Record / Add Record / Update Record
- Get App
- Get Form Fields / Add Form Fields / Update Form Fields / Delete Form Fields
- Get Form Layout / Update Form Layout
- Get Views / Update Views (for Apps with no Custom Views)
- Get General Settings / Update General Settings
- Get Process Management Settings / Update Process Management Settings
- Deploy App Settings
- Get App Deploy Status
- Get General Notification Settings / Update General Notification Settings
- Get Per Record Notification Settings / Update Per Record Notification Settings
- Get Reminder Notification Settings / Update Reminder Notification Settings
- Get App Permissions / Update App Permissions
- Get Record Permissions / Update Record Permissions
- Get Field Permissions / Update Field Permissions
- Get Graph Settings / Update Graph Settings
- Get Action Settings / Update Action Settings
- Get Form
- Enabling department access control will prevent everyone but Kintone Administrators from creating and viewing API Tokens. Refer to Using Department Access Control from the Kintone Help for more information on department access control.
Session authentication is a method of authentication where a session ID is assigned to a user by the web server, and saved as a cookie. This cookie is used to identify and authenticate the user.
The priority of authentication is as follows.
- Password authentication
- API Token authentication
- Session authentication
Guest users running API calls will only be able to use session authentication. They cannot use password authentication.
OAuth clients may also be used for authentication. Refer to How to Add OAuth Clients for more information.
The Basic Authentication feature is a Legacy feature which may not be available any more for some Kintone domains. Kintone environments that run on a kintone.com domain will not be able to use the Basic Authentication feature.
Kintone environments using basic authentication will need an additional authorization header. Add “Basic” followed by a BASE64 encoded “Basic_log_in_name:Password”. Note that initiating REST APIs for Apps in guest spaces will not need a header for basic authentication, as basic authentication itself cannot be used for guest spaces. If the basic authentication log in name is “chocolate” and the password is “pudding”, BASE64 encode “chocolate:pudding” and add this to the header: