Authentication overview
Authentication for the Adobe Sign API is the process by which client applications verify their identity and gain authorized access to Adobe Sign's services. This mechanism ensures that e-signature processes, document management, and user data interactions are secure and compliant with relevant regulations like OAuth 2.0 Authorization Framework. The Adobe Sign API primarily employs OAuth 2.0, a widely adopted authorization framework that enables applications to obtain limited access to user accounts on an HTTP service, in this case, Adobe Sign, without exposing user credentials.
Two main OAuth 2.0 flows are supported to accommodate different integration scenarios: the Service Account flow for system-to-system integrations where no direct user interaction is required, and the Authorization Code flow for applications that act on behalf of specific Adobe Sign users. Understanding these distinct flows is crucial for selecting the appropriate authentication strategy for your application's requirements. Each flow provides distinct mechanisms for obtaining and managing access tokens, which are temporary credentials used to authenticate subsequent API requests.
Proper implementation of Adobe Sign API authentication also involves securely managing API credentials, refreshing access tokens before they expire, and handling token revocation. Adhering to these practices maintains the integrity and security of your integration, preventing unauthorized access and ensuring continuous operation. The Adobe Developer Console serves as the central hub for managing API credentials and configuring application settings, playing a critical role in the authentication setup process.
Supported authentication methods
The Adobe Sign API supports OAuth 2.0 as its primary authentication mechanism, offering two distinct flows tailored to different integration needs. These flows are designed to provide secure and flexible access to the API.
- Service Account Flow (Server-to-Server Integration): This flow is ideal for applications that need to interact with the Adobe Sign API without direct user involvement. Examples include backend services automating document generation, sending agreements, or checking status updates. In this scenario, your application acts as an independent entity, authenticated using a client ID and client secret issued by Adobe. The application requests an access token directly from Adobe's authorization server using these credentials. This flow is particularly suited for unattended processes and batch operations, where a single application needs broad access to perform tasks across multiple users or an entire account, typically for administrative or automated functions.
- Authorization Code Flow (User-Specific Integration): This flow is designed for applications that operate on behalf of an Adobe Sign user. It requires user consent to grant your application permission to access their Adobe Sign account. This consent is typically obtained through a web-based redirect where the user logs into their Adobe account and authorizes your application. After authorization, your application receives an authorization code, which is then exchanged for an access token and a refresh token. The access token enables your application to make API calls on behalf of the user, while the refresh token allows your application to obtain new access tokens without requiring the user to re-authorize. This flow is suitable for client-side applications, mobile apps, or web applications where individual user context and permissions are paramount, such as a CRM integration where sales reps send agreements directly from their workflow.
Here's a comparison of the supported authentication methods:
| Method | When to Use | Security Level |
|---|---|---|
| OAuth 2.0 Service Account Flow | Server-to-server integrations, automated workflows, batch processing without direct user interaction. | High: Requires secure management of Client ID and Client Secret, typically stored server-side. |
| OAuth 2.0 Authorization Code Flow | Applications acting on behalf of a specific user, requiring user consent, interactive web/mobile applications. | High: Relies on user consent and secure token exchange, protecting user credentials. |
Both flows ensure that sensitive user credentials are never directly handled by your application, instead relying on token-based authorization. For detailed implementation steps and code examples for each flow, refer to the Adobe Sign API reference documentation.
Getting your credentials
To begin authenticating with the Adobe Sign API, you must first obtain the necessary credentials through the Adobe Developer Console. This console is the central platform for managing all your Adobe API integrations, including Adobe Sign.
- Access the Adobe Developer Console: Navigate to the Adobe Developer Console and sign in with your Adobe ID. If you don't have one, you'll need to create an account.
- Create a New Project: Once logged in, create a new project. A project acts as a container for all your integrations and services. Give your project a descriptive name.
- Add an API to Your Project: Within your new project, click 'Add API'. Search for 'Adobe Sign API' and select it. This step links the Adobe Sign API to your project, allowing you to generate credentials specific to this API.
- Choose Your Credential Type:
- For Service Account (JWT) Credentials: Select 'Service Account (JWT)' as the authentication type. This choice is suitable for server-to-server applications. Upon selection, the console will generate a
Client ID(API Key) and aClient Secret. It will also provide an option to generate a private key (private.keyfile) and a public key certificate (certificate_pub.crtfile), which are used to generate JSON Web Tokens (JWTs) for authentication. Securely download and store these files, as they are essential for signing your JWT assertions. - For OAuth 2.0 Credentials: Select 'OAuth 2.0' as the authentication type. You will need to specify your application's redirect URI(s). These are the URLs where Adobe will send the authorization code after a user grants consent. The console will then provide a
Client IDand aClient Secret. The Client Secret should be kept confidential and never exposed in client-side code.
- For Service Account (JWT) Credentials: Select 'Service Account (JWT)' as the authentication type. This choice is suitable for server-to-server applications. Upon selection, the console will generate a
- Configure API Permissions/Scopes: After selecting your credential type, you will need to configure the specific permissions (scopes) your application requires. For example, if your application only needs to send agreements, you would select scopes related to agreement creation and sending, not user management. Granting only necessary permissions adheres to the principle of least privilege, enhancing security.
- Review and Save: Review all the generated credentials and configured settings. Save them securely. The Client Secret is often shown only once, so ensure you copy it immediately.
Once you have your credentialsâwhether a Client ID and Client Secret for OAuth 2.0 or the Service Account credentialsâyou are ready to integrate them into your application's authentication flow. These credentials serve as the foundation for all subsequent API requests. For more information on managing your API keys and integrating with Adobe services, consult the Adobe Sign Getting Started guide.
Authenticated request example
This example demonstrates how to make an authenticated request using a bearer token obtained via the OAuth 2.0 Service Account flow. This flow is common for server-side applications.
First, you need to exchange your Service Account credentials (Client ID, Client Secret, and private key) for an access token. This typically involves creating a JWT, signing it with your private key, and then exchanging the JWT for an access token with Adobe's OAuth endpoint. Once you have the access_token, you can include it in the Authorization header of your API requests.
# Step 1: Obtain an Access Token (simplified conceptual example)
# In a real application, you would use an SDK or library to create and sign a JWT assertion
# and then exchange it for an access token with Adobe's OAuth endpoint.
# For example, using Python with the Adobe Sign SDK:
# from adobe.pdfservices.auth.service_account_credentials import ServiceAccountCredentials
# credentials = ServiceAccountCredentials(
# client_id='YOUR_CLIENT_ID',
# client_secret='YOUR_CLIENT_SECRET',
# private_key='YOUR_PRIVATE_KEY_CONTENT',
# technical_account_id='YOUR_TECHNICAL_ACCOUNT_ID',
# organization_id='YOUR_ORGANIZATION_ID',
# meta_scopes=['AdobeSignAPI']
# )
# access_token = credentials.get_access_token()
# For this example, assume you have already obtained a valid access token.
ACCESS_TOKEN="your_obtained_access_token"
# Step 2: Make an API request using the obtained Access Token
# Example: List all agreements in your account
curl -X GET \
"https://api.na1.echosign.com/api/rest/v6/agreements" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json"
In this cURL example:
ACCESS_TOKENis the bearer token acquired through the OAuth 2.0 Service Account flow.https://api.na1.echosign.com/api/rest/v6/agreementsis the endpoint for listing agreements. The base URL (api.na1.echosign.com) might vary based on your Adobe Sign shard.-H "Authorization: Bearer $ACCESS_TOKEN"sets theAuthorizationheader, which is crucial for authenticating your request. The token type isBearer, followed by a space and your access token.-H "Content-Type: application/json"specifies the content type of the request body, although for a GET request listing agreements, a body might not be required, it's good practice to include for consistency.
This structure is consistent across most Adobe Sign API endpoints. For other operations like sending an agreement or uploading a document, the method (POST, PUT, etc.) and payload would change, but the authentication header remains the same. You can find more detailed examples for specific API calls in the Adobe Sign API reference.
Security best practices
Implementing robust security practices is paramount when working with the Adobe Sign API, especially given the sensitive nature of e-signature documents. Adhering to these best practices will help protect your application, user data, and maintain compliance.
- Secure Credential Storage: Never hardcode API keys, client secrets, or private keys directly into your application's source code. Instead, store them in secure environment variables, a secrets management service (e.g., AWS Secrets Manager, Azure Key Vault, HashiCorp Vault), or a secure configuration file that is not publicly accessible and is excluded from version control systems. Rotating these credentials periodically adds an extra layer of security.
- Principle of Least Privilege: When configuring API permissions (scopes) in the Adobe Developer Console, grant only the minimum necessary permissions that your application requires to perform its functions. Avoid granting broad or unnecessary access. For instance, if your application only sends agreements, do not grant scopes for user management or account administration. This limits the potential impact of a security breach.
- Token Management and Expiry: Access tokens have a limited lifespan. Your application must be designed to handle token expiry gracefully by using refresh tokens (for the Authorization Code flow) or re-generating JWT assertions (for the Service Account flow) to obtain new access tokens before the current one expires. Store refresh tokens and private keys securely, as their compromise could lead to unauthorized persistent access. Tokens should be stored in memory for short durations and never logged or exposed in client-side code.
- Validate Redirect URIs: For the OAuth 2.0 Authorization Code flow, carefully configure and validate your redirect URIs in the Adobe Developer Console. Only allow redirect URIs that are controlled by your application. This prevents malicious actors from redirecting authorization codes to their own servers in a phishing attack. Similarly, ensure that the
stateparameter is used during the OAuth flow to prevent Cross-Site Request Forgery (CSRF). - Error Handling and Logging: Implement comprehensive error handling for API calls, especially authentication failures. Log relevant information (without exposing sensitive data like tokens or credentials) to help diagnose issues and detect potential security incidents. Monitor these logs for unusual activity or repeated authentication failures, which could indicate an attack attempt.
- HTTPS Everywhere: Always use HTTPS for all communication with the Adobe Sign API. This encrypts data in transit, protecting it from eavesdropping and tampering. Adobe Sign API endpoints are exclusively HTTPS, but ensure your application enforces HTTPS for its own internal and external communications. This is a fundamental web security practice, also emphasized by organizations like the World Wide Web Consortium in their security recommendations.
- Regular Security Audits and Updates: Periodically review your application's authentication implementation and overall security posture. Keep all libraries, SDKs, and dependencies up to date to benefit from the latest security patches. Be aware of common web vulnerabilities and ensure your application is protected against them.
- User Consent and Data Privacy: For applications using the Authorization Code flow, clearly communicate to users what data your application will access and why. Adhere to data privacy regulations such as GDPR and CCPA when handling user data obtained through the API.