Skip to main content

Giving Devin Credentials

Devin can use its own login credentials to access platforms that require authentication, either in its Browser or via the command line. We recommend setting up a dedicated account for Devin to use (e.g. devin@company.com) on each service that it needs access to. You may then save Devin’s username and password as Secrets on your account, so that it can log in as part of your future sessions. Adding secrets is primarily done via the Secrets page. This page is particularly relevant for Organization-level secrets. For repo-specific or session-specific secrets, see the below sections. To add several secrets at once, click Bulk add secrets next to Add secret, then upload a .env file (up to 2 MB) or paste one KEY=value per line. Cookies and TOTP codes are added one at a time.
Devin
When adding a secret, you may add a Note that explains additional context or instructions for using the secret. Use this field to convey useful information to both Devin and your fellow organization members. Example notes could include:
  • This API key should only be used in our production env but never in staging or dev.
  • Used for our AWS RDS Database in us-west-2
  • These credentials are scheduled to be deprecated after Q3 2025
  • Auto-expires every 30 days - ping the SecOps team for rotation if this starts failing
  • This API key is attached to the devin@company.com user account
Under More controls in the New secret form, Redact value is on by default. A redacted value can’t be shown again. To change it, or to turn Redact value off, open the secret, click Edit, and enter a new value.

Persisted Global Secrets

Secrets added in Settings → Resources → Secrets are persisted to future sessions and apply to the entire organization. Note that any secrets you share here will be usable by Devin in all future Devin sessions within your organization. All secrets are encrypted at rest. All members of your organization can use Global Secrets in their sessions. By default they can also create, edit, and delete them, because the default Member role includes the Manage secrets permission. Take care to only add secrets that are specifically scoped to your organization and usable by all its members. On Devin Enterprise, an enterprise admin can remove Manage secrets from the organization-level Member role and grant it through a custom role instead; see Custom Roles & RBAC.

Personal Secrets

In addition to organization-wide secrets, you can create personal secrets that are scoped to your own sessions only. Personal secrets are not shared with other members of your organization. This is useful for credentials tied to your personal accounts or for testing secrets that should not be exposed to the broader team. To create a personal secret, select the Personal scope when adding a new secret on the Secrets page. Personal secrets are only accessible in sessions you create and are not visible to other organization members or admins. There are a few types of secrets available:
This is most suitable for most generic secrets with a single value. In the Type field, select Key-value. Each Secret Name (also known as a Secret Key) is associated with a single Secret Value. Examples of secrets stored here could be:
  • API Keys
  • SSH Keys
  • Usernames or Passwords
  • Tokens
If a single secret requires multiple values, please make a distinct secret for each value. For example, you could store GITHUB_USERNAME and GITHUB_PASSWORD as two Raw Secrets. For an example that stores an API key as several raw secrets, see Upload iOS builds to TestFlight.
Time-based one-time passwords are used for two-factor authentication (2FA). Devin can store TOTP secrets that act similarly to those in Google Authenticator or Authy. For details of how to add a TOTP secret, please see Adding a New TOTP
Devin used to support secrets that would handle multiple keys per secret. However, this feature is no longer available.Instead, we recommend simply creating a Key-value secret for each distinct field. For example, instead of creating one secret for JIRA_LOGIN, you could create two secrets: JIRA_USERNAME and JIRA_PASSWORD.

Bot-Specific Secrets

A Devin Bot can hold secrets that only that Bot and its sessions use, in addition to your organization’s secrets. Add them on the Secrets page of the Bot’s settings. See Devin Bot connections and secrets.

Repo-Specific Secrets

To scope secrets to a specific repository, add them in that repository’s blueprint editor:
  1. Go to Settings > Environment > Blueprints and select the repository. The repository must already be part of your environment.
  2. Open the Secrets tab.
  3. Click Create secret to add a single secret, or Import secrets to add several at once.
From the same tab you can search, reveal, edit, and delete the repository’s secrets. Creating, editing, and deleting repository secrets requires the Manage secrets permission, which the default Member role includes. Repository secrets are only available for that repository: to its blueprint steps during snapshot builds, and to Devin when it works in that repository during sessions. They are stored encrypted and are never written into your blueprint or snapshot. See Secrets in the blueprint reference for how they are injected.
Don’t put secret values in blueprint YAML, setup commands, or .env files committed to the repository. Store them in the repository’s Secrets tab and reference them by name (for example, $MY_SECRET) instead.

Session-Specific Secrets

While Devin is working, it may ask you to provide credentials (API keys, logins, etc.) within the current conversation, like so:
Devin
A secret on this card applies only to the current session, unless Save for future sessions is selected. Devin can preselect this option, so examine it before you send the secret. Alternatively, you can set session-specific secrets yourself:
Devin

Working With Secrets

Devin provides each secret to the specific commands and tools that need it. In the browser, Devin types the value directly. For shell commands, it binds secrets as environment variables whenever needed. This applies to organization-wide, repo-specific, and session-specific secrets. Secrets are not exported into every shell, so scripts should not assume a variable like $API_KEY is already set. If a script depends on a secret, tell Devin which environment variable it reads and Devin will bind it to the relevant commands. Organization and personal secrets have a Require approval before each use switch under More controls in the New secret form. It is off by default. Devin performs some text conversion to ensure that your Secrets are valid ENV variables:
  • It removes invalid characters by replacing anything other than a letter, digit, or underscore with another underscore. For example, the secret named Abc%123 would become the ENV variable Abc_123
  • If your secret name begins with a digit, Devin adds an underscore to the beginning of the name. For example, the secret 123MYVAR would become the ENV variable _123MYVAR (names that already start with a letter or underscore are unchanged)
  • If you have two secrets with the same name, Devin will add a counter to the end. For example, if you have two secrets named MY_SECRET you would end up with two ENV variables named MY_SECRET and MY_SECRET_2 and so on.
To add a Site Cookie, please follow the steps below:
  1. Log in as you normally would to the account you’d like to share with Devin. This will generate cookie(s).
  2. Add the exported cookie to Devin via the Secrets page.
  3. When using the cookie for a site, Devin should find that it’s already logged in when it navigates to that site. Tell Devin to give it a try!
If you do not use Chrome, select JSON in the New secret form and paste the cookies as JSON. If you encode cookies manually, select base64. Devin expects a base64 encoded string of ; delimited JSON objects in the standard Chromium cookie format.

Adding a New TOTP

Devin can now handle two-factor authentication (2FA) using a time-based one-time password (TOTP). To do this, you’ll need to give Devin the information provided at the time 2FA is set up on Devin’s account for the specific application:
  1. Access Devin’s account for the service that requires 2FA.
  2. Go to the account security settings and look for an option to regenerate or view the QR code. This may be called Set up or Replace Authenticator.
  3. If the application allows, select the option to view the QR code.
  4. Once the QR code is displayed on your screen, take a screenshot.
  5. Go to Devin’s Secrets, click on the Add secret button, and change the Type to One-Time Password (TOTP). Put a descriptive name. Click the small QR code icon in the top right of the Value input box and upload your QR code screenshot. You can also paste an otpauth://totp/ URI.
Only provide 2FA codes associated with accounts that were specifically set up for Devin’s use only. We do not recommend giving Devin any 2FA codes to your personal accounts.

Tips for TOTPs

  • Some applications may not allow you to view the existing QR code once 2FA is enabled. In such cases, regenerating the QR code is the only option.
  • Always save any new backup codes provided during the process in a secure location.