Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
---
title: "Authentication"
description: "Log in as a machine identity and use the returned access token on every Infisical API request."
---
To call the Infisical API, you need to authenticate as a [machine identity](/documentation/platform/identities/machine-identities) using one of the authentication methods listed below. The authentication method returns a short-lived access token. Include that token as an `Authorization: Bearer <token>` header on every Infisical API request.
<Note>
For a guide on authenticating with Universal Auth and calling the API, check out the [Quickstart](/api-reference/overview/quickstart).
</Note>
## Authentication methods
Each authentication method accepts a different type of credential:
### Infisical-issued credentials
These methods accept credentials that Infisical creates and manages directly, such as a client ID and client secret or a long-lived access token. They work from any environment.
<CardGroup cols={2}>
<Card title="Universal Auth" href="/documentation/platform/identities/universal-auth">
Authenticate with a client ID and client secret.
</Card>
<Card title="Token Auth" href="/documentation/platform/identities/token-auth">
Authenticate with a long-lived, manually issued access token.
</Card>
</CardGroup>
### Cloud providers
Cloud providers accept the identity the calling workload already has on that cloud, such as an IAM role, a managed identity, or a service account.
<CardGroup cols={2}>
<Card title="AWS Auth" href="/documentation/platform/identities/aws-auth">
Authenticate from an EC2 instance, ECS task, Lambda function, or any AWS workload with an IAM role.
</Card>
<Card title="Azure Auth" href="/documentation/platform/identities/azure-auth">
Authenticate from an Azure workload with a managed identity.
</Card>
<Card title="GCP Auth" href="/documentation/platform/identities/gcp-auth">
Authenticate from a Compute Engine instance, GKE pod, or Cloud Run service using its GCP service account.
</Card>
<Card title="Kubernetes Auth" href="/documentation/platform/identities/kubernetes-auth">
Authenticate from a Kubernetes pod using its service account token.
</Card>
<Card title="OCI Auth" href="/documentation/platform/identities/oci-auth">
Authenticate from an Oracle Cloud compute instance using its instance principal.
</Card>
<Card title="AliCloud Auth" href="/documentation/platform/identities/alicloud-auth">
Authenticate from an Alibaba Cloud workload using an assumed RAM role.
</Card>
</CardGroup>
### External identity
These methods accept a credential from a trusted external system, such as an OIDC identity token, a JWT signed by a trusted issuer, an LDAP bind, a client certificate, or a SPIFFE SVID.
<CardGroup cols={2}>
<Card title="OIDC Auth" href="/documentation/platform/identities/oidc-auth/general">
Authenticate with an OIDC identity token from a trusted OIDC provider.
</Card>
<Card title="JWT Auth" href="/documentation/platform/identities/jwt-auth">
Authenticate with a JWT signed by a trusted issuer.
</Card>
<Card title="LDAP Auth" href="/documentation/platform/identities/ldap-auth/general">
Authenticate against a configured LDAP directory.
</Card>
<Card title="TLS certificate Auth" href="/documentation/platform/identities/tls-cert-auth">
Authenticate with a client certificate signed by a trusted certificate authority.
</Card>
<Card title="SPIFFE Auth" href="/documentation/platform/identities/spiffe-auth">
Authenticate with a SPIFFE SVID from a workload attested by SPIRE.
</Card>
</CardGroup>
## FAQ
<AccordionGroup>
<Accordion title="Why can I not create, read, update, or delete an identity?">
A few reasons this can happen:
- The calling identity doesn't have the org permissions required to manage identities
- The identity being changed is more privileged than the calling identity
- The role being assigned is more privileged than any role held by the calling identity
</Accordion>
<Accordion title="Why is the Infisical API rejecting my identity credentials?">
A few reasons this can happen:
- The client secret or access token has expired
- The identity doesn't have the permissions required by the endpoint
- The client secret or access token is being used from an IP address the identity doesn't trust
</Accordion>
</AccordionGroup>