How to authenticate Kintone REST API requests using password, API token, or session authentication.
Every Kintone REST API request must be authenticated. Kintone supports three authentication methods: password authentication, API token authentication, and session authentication. Choose the method that suits your use case.
For APIs that operate on a guest space, the URL path changes to /k/guest/{spaceId}/v1/.... The same authentication headers apply.
Use a Kintone user’s login name and password, encoded as a Base64 string, to authenticate requests. This method is suitable for server-to-server integrations where you control the credentials.When to use it: Server-side scripts, backend integrations, or automated tools that run outside the browser.
Each Kintone app can issue API tokens that grant specific permissions (such as read, write, or manage) to an application. API tokens are scoped to a single app.When to use it: External integrations, webhook consumers, and scripts that interact with a specific app. API tokens are preferred over password authentication because they are easier to revoke and scope.
When your code runs inside a Kintone browser page (for example, in a JavaScript customization), the user’s existing browser session authenticates API requests automatically. No additional header is required.When to use it: JavaScript customizations and plug-ins that run inside the Kintone browser UI.
When you call kintone.api(), Kintone automatically attaches the current session credentials and a CSRF token to the request. You do not need to handle authentication manually.
Session authentication is handled automatically by kintone.api(). If you make raw HTTP requests from inside a customization, you must include a CSRF token:
Kintone supports OAuth 2.0 for delegated authorization. This allows third-party applications to access Kintone on behalf of a user without handling their credentials directly.When to use it: Third-party integrations where end users authorize access to their Kintone data through an OAuth consent flow.
You register your application in the Kintone administration settings to obtain a client ID and client secret. Your application then redirects users through the standard OAuth 2.0 authorization code flow to obtain an access token. Pass the access token in the Authorization header.
APIs that target a guest space use a different URL prefix: /k/guest/{spaceId}/v1/... instead of /k/v1/.... All authentication methods work the same way — only the path changes.Example: