Authentication overview

Monday.com employs industry-standard authentication mechanisms to secure access to its GraphQL API. These methods ensure that only authorized applications and users can interact with account data, supporting both individual developer needs and complex application integrations. The choice of authentication method depends on the integration's scope, audience, and required level of user interaction.

The primary goal of Monday's authentication system is to provide secure, granular control over API access. This is achieved through two main approaches: personal API tokens for quick, script-based access and OAuth 2.0 for third-party applications requiring user consent and broader access management. Understanding the distinctions between these methods is crucial for building secure and scalable integrations with the Monday platform.

For detailed information on the GraphQL API capabilities, refer to the official Monday API reference documentation.

Supported authentication methods

Monday supports two primary authentication methods for its API, each designed for different integration scenarios:

  1. Personal API Tokens: These tokens provide direct, programmatic access to a user's Monday account. They are suitable for personal scripts, internal tools, and server-side applications where the user's explicit consent is managed outside the application flow. A personal API token is a long-lived credential that grants the same permissions as the user who generated it.
  2. OAuth 2.0: This protocol is designed for third-party applications that need to access user data on behalf of an authenticated user without directly handling their credentials. OAuth 2.0 enables applications to request specific permissions (scopes) from users, who then grant or deny access. This method is ideal for public applications, marketplace integrations, and scenarios where multiple users from different Monday accounts will use the integration. OAuth 2.0 is an open standard that enables delegated authorization, as described by the OAuth 2.0 specification.

The following table summarizes the key characteristics of each authentication method:

Method When to Use Security Level Grant Type/Flow
Personal API Tokens Internal scripts, single-user tools, server-side integrations, quick testing Medium (direct access, requires careful handling) Implicit (token generated directly by user)
OAuth 2.0 Public applications, marketplace apps, multi-user integrations, delegated access High (delegated permissions, token rotation) Authorization Code Flow (typically)

Getting your credentials

The process for obtaining authentication credentials differs based on the method you choose:

For Personal API Tokens:

  1. Log in to your Monday.com account.
  2. Navigate to your profile picture (usually in the top right corner).
  3. Select "Admin" from the dropdown menu.
  4. Go to the "API" section.
  5. Under the "Personal Tokens" tab, you can generate a new token.
  6. Copy the generated token immediately, as it will only be shown once.

Keep your personal API token secure, as it grants full access to your account's data and actions within the Monday platform. For more specific instructions, consult the Monday support article on API tokens.

For OAuth 2.0:

To use OAuth 2.0, you must first register your application with Monday. This process typically involves:

  1. Creating a Developer App: Access the Monday developer platform (often through the Admin section or a dedicated developer portal).
  2. Registering Your Application: Provide details such as your application's name, description, redirect URIs, and requested OAuth scopes. The redirect URI is where Monday will send the authorization code after a user grants permission.
  3. Obtaining Client ID and Client Secret: Upon successful registration, Monday will issue a unique Client ID and Client Secret for your application. The Client ID identifies your application, while the Client Secret is a confidential key used to authenticate your application with Monday's authorization server.
  4. Configuring OAuth Flows: Implement the standard OAuth 2.0 authorization code flow in your application. This involves directing users to Monday's authorization endpoint, handling the callback to your redirect URI, and exchanging the authorization code for an access token and refresh token.

The specific steps for registering an OAuth application and implementing the flow are detailed in the Monday developer documentation on OAuth authentication.

Authenticated request example

Once you have an API token, you can include it in the Authorization header of your HTTP requests. Monday's GraphQL API expects the token to be prefixed with Bearer. Here's an example using curl to query the API:

curl -X POST \
  'https://api.monday.com/v2' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -d '{"query": "query { boards { name id } }"}'

Replace YOUR_API_TOKEN with your actual personal API token. This example queries for the names and IDs of all boards accessible to the user associated with the token.

When using OAuth 2.0, after successfully completing the authorization flow, your application will receive an access_token. This token should be used in the same way as the personal API token in the Authorization: Bearer header.

For more complex queries and mutations, refer to the Monday API GraphQL queries documentation.

Security best practices

Implementing strong security practices is essential when integrating with the Monday API to protect sensitive data and maintain the integrity of your applications. Adherence to these guidelines helps mitigate common security risks:

  • Keep API Tokens Confidential: Never hardcode API tokens directly into client-side code, commit them to version control systems (like Git), or expose them in public repositories. Store them as environment variables, in secure configuration files, or using a secrets management service.
  • Use Environment Variables for Credentials: When deploying applications, use environment variables to inject API keys and secrets rather than embedding them directly in the codebase. This practice is widely recommended for securing sensitive information, as detailed in guides like those found on Google Cloud security best practices.
  • Implement OAuth 2.0 for Third-Party Apps: For publicly accessible applications or those used by multiple users, always opt for OAuth 2.0. This prevents your application from ever handling user credentials directly and allows users to revoke access without affecting other applications.
  • Scope Permissions Appropriately: When using OAuth 2.0, request only the minimum necessary permissions (scopes) that your application requires to function. Over-privileged applications pose a greater security risk if compromised.
  • Rotate API Tokens: Regularly generate new personal API tokens and revoke old ones. This practice limits the window of exposure if a token is ever compromised.
  • Secure Redirect URIs: For OAuth 2.0 applications, ensure that your registered redirect URIs are secure and specific. Only use https and avoid wildcard URIs where possible to prevent authorization code interception attacks.
  • Encrypt Data in Transit: Always use HTTPS for all API communications to ensure that data, including authentication tokens and sensitive payload information, is encrypted during transit. Monday's API enforces HTTPS by default.
  • Error Handling and Logging: Implement robust error handling and logging to monitor for unusual activity or authentication failures. This can help detect potential misuse or attempted unauthorized access.
  • Rate Limiting and Throttling: Be mindful of Monday's API rate limits to prevent your application from being temporarily blocked. Implement appropriate retry mechanisms with exponential backoff rather than aggressively retrying failed requests.
  • Regular Security Audits: Periodically review your application's security posture, including how it handles and stores credentials, and verify that all integrations adhere to the latest security recommendations from Monday.