Resolving 401 Unauthorized errors when accessing the generatePdf API in Adobe Experience Manager
Adobe Experience Manager (AEM) may return an HTTP 401 Unauthorized error when applications attempt to access the generatePdf API. To resolve the issue, validate authentication credentials, verify permissions, and review recent authentication-related configuration changes.
Description description
Environment
Adobe Experience Manager (AEM)
Issue/Symptoms
- When attempting to access the generatePdf API through an application integrated with Adobe Experience Manager, an HTTP 401 Unauthorized error may occur.
- The error prevents users from opening or generating PDF files required for business workflows.
- The issue is reproducible when accessing the API through the application interface.
- The request lacks valid authentication credentials, or the provided credentials do not have sufficient permissions.
Resolution resolution
Follow the steps below to resolve the issue:
- Confirm that the credentials or authentication tokens used by the application to access the generatePdf API are valid and have not expired.
- Verify that the user or service account has the necessary permissions to invoke the generatePdf API in your AEM environment.
- Check for any recent changes to authentication configurations, such as updates to identity providers, API keys, or OAuth settings, that may affect access.
- If your environment has recently transitioned (for example, to a new production environment or a long-term support (LTS) version), ensure that all required templates and content paths have been synchronized and that access policies are consistent with the previous environment.
- Test API access directly outside the application by using a tool such as curl or Postman to determine whether the issue originates from the application or the backend API.
- If the issue persists, review AEM and Dispatcher logs for additional details about authentication failures.
- After completing these steps, attempt to access the generatePdf API again to verify that the issue is resolved.
recommendation-more-help
experience-cloud-kcs-help-kbarticles