Back to all posts
Security7 min read·October 25, 2026

How to Share API Keys With Developers Securely

TB
ThynkBlox Team
Engineering

How should you share API keys with developers securely?

Give developers named accounts with limited permissions wherever possible, and keep API keys in a managed secret store with controlled access. Use separate credentials for development, testing and production, and agree upfront who can approve access, replace keys and remove people. Treat access as a temporary permission to do specific work, rather than a permanent password handed over in a message.

As a founder, you should be able to answer three questions: who has access, what can they do, and how will you remove that access?

What should you agree before granting access?

Start with the work the agency needs to complete. “Access to everything” is not a useful requirement. “Read test transactions while building the reporting screen” is specific enough to review.

Ask the agency to list each service it needs, the people who need access, the permissions required and whether the work involves production. Assign someone in your business to approve those requests.

Keep ownership of important accounts within your business. Your organisation should control billing, recovery options and the ability to appoint or remove administrators. Ask the agency to work through invitations to those accounts.

Make this part of choosing a partner. Our guide to questions to ask a software development agency can help you frame the wider discussion about ownership and responsibility.

When should you use an account instead of sharing a password?

Prefer a separate, named account for each person whenever the service supports it. Give people their own sign-in method and require multi-factor authentication where available.

For application access, ask whether the service supports a dedicated identity for the application or temporary credentials. Reserve personal accounts for people.

Use this as a starting point:

Access neededPreferred arrangementBoundary to agree
A developer using a service dashboardNamed account with a limited roleApproved project and environment
An application calling an APIDedicated application identity or scoped keyRequired operations only
A developer testing an integrationTest account and test credentialsNo production access
A legacy service with one shared loginBusiness-controlled password managerNamed recipients and a replacement plan
Urgent production supportSeparately approved temporary accessDefined task and removal point

If a service only offers one owner login, treat sharing it as an exception. Document who can use it and keep account recovery under your control.

What does least privilege mean in practice?

Least privilege means granting only the permissions needed for the agreed task.

For each request, ask:

  • Does the person need to view information, change it or administer the account?
  • Can access cover one project rather than the entire organisation?
  • Does the task require production?
  • Can access expire when the work ends?
  • Who will approve any increase in permissions?

For example, someone checking whether an integration works should not automatically receive permission to manage billing or invite other users.

Where permissions are coarse, record the limitation before approving access. Consider whether the agency can complete the task through a supervised session or a test account instead.

Where should API keys and shared passwords live?

Use a managed secret store for application credentials and a business-controlled password manager for shared human logins. Choose arrangements that let you manage named recipients, remove access and review available access records.

Share an invitation or a reference to the stored item, rather than pasting its value into email, chat, project tickets or documents. Keep setup instructions separate from the secret itself.

For each stored credential, record:

  • Its purpose and the service it belongs to.
  • Whether it is for development, testing or production.
  • The person responsible for it.
  • Which applications or people are authorised to use it.
  • How to replace or revoke it.

Ask the agency to keep secret values out of screenshots, recordings, support requests and diagnostic output. Any instruction that requires copying a secret should explain where it belongs and how temporary copies will be handled.

Why should development and production use separate credentials?

Make separate credentials and accounts a project requirement wherever the service supports them. Development should use test data and test services; production access should require a separate decision.

An illustrative setup for a customer notification feature might look like this:

EnvironmentIntended useAccess arrangement
DevelopmentBuild and troubleshootDeveloper accounts and test credentials
TestingCheck the complete featureDedicated test credentials and approved recipients
ProductionSend real customer messagesApplication credentials and limited support access

Do not approve production access simply because test access is inconvenient. Ask what task requires it, what actions will be taken and how access will end.

Include these boundaries in the project brief so they survive changes in personnel.

What should an audit trail tell you?

Ask for records that help answer who received access, who approved it, which credential or account was involved, and when access changed.

Check what each service actually records before relying on it. Distinguish between viewing a stored key, changing permissions and using that key to call an API. Ask the agency to demonstrate which of those events you can review.

Avoid treating a shared credential as proof of an individual person's actions. Attribution to a specific person requires appropriate individual identity and logging support.

Assign someone to review access when the team changes, when responsibilities change and when the engagement ends. Keep records of approvals without recording secret values.

For the broader application context, see data security in modern applications.

How should you rotate credentials without interrupting the service?

Agree on a replacement procedure before you need it.

Start by identifying everything that uses the credential and who can update each consumer. Then create a replacement, update the authorised consumers, verify the intended operations and revoke the old credential.

Check whether the provider allows old and new credentials to overlap. If it does not, plan a coordinated change and tell the relevant people what interruption to expect.

Treat routine rotation and suspected exposure differently. For suspected exposure, prioritise containment and have the responsible technical owner decide whether the old credential must be revoked immediately.

Deleting a message containing a key does not invalidate that key at the issuing service.

How should emergency access work?

Define emergency access before an outage.

Name a primary business approver and a backup. Specify which account or role can be used, how the person requesting access identifies themselves, and when the permission must be removed.

Keep recovery methods under business control. Test that an authorised backup can complete the recovery process without depending on an unavailable agency contact.

After emergency work, review the actions taken, remove temporary permissions and replace any credentials exposed during the intervention. Record enough detail to explain the changes without including the secrets.

What should happen when someone leaves?

Remove access when a person leaves the project, including when they remain employed by the agency.

Use an offboarding checklist:

  • Remove named accounts and project memberships.
  • Remove access to secret stores and password-manager collections.
  • Review active sessions and revoke them where supported.
  • Revoke personal tokens and temporary permissions.
  • Review shared credentials the person could access and replace them as appropriate.
  • Transfer ownership of applications, recovery methods and scheduled work.
  • Verify that the application still performs its essential operations.

Ask the agency to notify you before staffing changes where possible. Agree who performs offboarding and who checks that it is complete.

What are the common mistakes?

Giving everyone administrator access. Require a reason for each privileged role and review it when the task ends.

Using one permanent key for every environment. Establish separate credentials before development begins.

Leaving ownership with one agency employee. Keep business control of accounts and recovery methods.

Assuming the storage tool handles the whole problem. Also decide who approves access, how it is reviewed and how credentials are revoked.

Removing an invitation without reviewing copied credentials. Include shared secrets and personal tokens in offboarding.

Waiting until handover to discuss access. Put ownership and exit arrangements in the initial agreement.

What questions do founders often ask?

Can I share a password through an encrypted message?

Prefer a password-manager invitation. If a message is unavoidable, treat it as an exception: verify the recipient, minimise the access granted and agree how the credential will be replaced afterward.

Does every developer need production access?

Start with no production access. Approve it only for a defined task that cannot reasonably be completed through testing or an authorised operator.

What if the service cannot create limited API keys?

Document that limitation. Consider a separate account, supervised access or a different integration approach before granting broad access.

What should I ask for at handover?

Request an account and credential inventory without secret values, confirmed business ownership, replacement instructions and evidence that agency access has been removed or explicitly renewed.


*Need help setting clear access boundaries for your software project? Start a conversation.*

Ready to build?

Let's turn these ideas into your next product.

Start your project