Docusign fail return of Oauth

Certified Senior Developer

We are using a DocuSign integration configured and tested successfully in the development environment with a DocuSign developer account.

However, we are encountering issues during the authorization phase when using the authorization link.

The authorization flow redirects correctly to DocuSign, and the login page is displayed, allowing the user to log in successfully. However, after the login, the system does not return the authorization token to the application as expected.

By checking the application logs, we can see the following error during the OAuth callback processing. This error appears multiple times; below is one example:

2026-04-21 05:57:39,619 [http-nio-8080-exec-794] ERROR com.appiancorp.connectedsystems.http.oauth.OAuthServlet - Error processing request to Appian OAuth callback URL. 
com.appiancorp.suiteapi.common.exceptions.AppianException: Failed to decrypt. Only values of type Encrypted Text can be decrypted. (APNX-1-4260-002)

It seems that the OAuth callback is reached, but the token exchange or decryption step is failing.

I'm trying to recreate connected system or new keys on docusing, but without success. 

The AUTHORIZE button in the connected system, go, but we have multiple singers and we have to use authorization link in interface

  Discussion posts and replies are publicly visible

Parents
  • The error "Failed to decrypt. Only values of type Encrypted Text can be decrypted. (APNX-1-4260-002)" indicates Appian is trying to decrypt a value that isn't properly encrypted. Since the AUTHORIZE button works but your custom authorization link fails, the issue is likely related to how the link is generated or a naming conflict.

    Follow these steps to resolve:

    1. Check for naming conflicts
    - Go to Appian Designer > Applications.
    - If an Application has the exact same name as your DocuSign Connected System, rename the Application.
    - If that doesn't help, recreate the Connected System with a new name and update integrations.

    2. Verify Appian’s encryption key
    - In Admin Console > Encryption Key Management, ensure the encryption key is configured and valid. Regenerate if needed.

    3. Use a!authorizationLink correctly
    - Only generate the link when an integration returns fv!connectedSystem in an error (e.g., "Access_token" missing).
    - Example:

    a!localVariables(
    local!integrationResult: rule!EXAMPLE_OAuthIntegration(),
    a!linkField(
    label: "Authorize DocuSign",
    showWhen: local!integrationResult.error.message = "Access_token",
    links: a!authorizationLink(
    label: "Authorize",
    connectedSystem: local!integrationResult.connectedSystem
    )
    )
    )

    - Do NOT use a!authorizationLink with a connectedSystem obtained outside a failed integration context.

    4. Check DocuSign OAuth settings
    - Ensure the Callback URI in DocuSign matches exactly the one Appian uses (including https and port).
    - Confirm the grant type is Authorization Code Grant.

    5. Consider switching to JWT Grant
    - For multiple signers, JWT (system-level auth) avoids callback issues and is more stable.

    If the problem persists, contact Appian Support with the full error log, Connected System configuration, and Appian version.

Reply
  • The error "Failed to decrypt. Only values of type Encrypted Text can be decrypted. (APNX-1-4260-002)" indicates Appian is trying to decrypt a value that isn't properly encrypted. Since the AUTHORIZE button works but your custom authorization link fails, the issue is likely related to how the link is generated or a naming conflict.

    Follow these steps to resolve:

    1. Check for naming conflicts
    - Go to Appian Designer > Applications.
    - If an Application has the exact same name as your DocuSign Connected System, rename the Application.
    - If that doesn't help, recreate the Connected System with a new name and update integrations.

    2. Verify Appian’s encryption key
    - In Admin Console > Encryption Key Management, ensure the encryption key is configured and valid. Regenerate if needed.

    3. Use a!authorizationLink correctly
    - Only generate the link when an integration returns fv!connectedSystem in an error (e.g., "Access_token" missing).
    - Example:

    a!localVariables(
    local!integrationResult: rule!EXAMPLE_OAuthIntegration(),
    a!linkField(
    label: "Authorize DocuSign",
    showWhen: local!integrationResult.error.message = "Access_token",
    links: a!authorizationLink(
    label: "Authorize",
    connectedSystem: local!integrationResult.connectedSystem
    )
    )
    )

    - Do NOT use a!authorizationLink with a connectedSystem obtained outside a failed integration context.

    4. Check DocuSign OAuth settings
    - Ensure the Callback URI in DocuSign matches exactly the one Appian uses (including https and port).
    - Confirm the grant type is Authorization Code Grant.

    5. Consider switching to JWT Grant
    - For multiple signers, JWT (system-level auth) avoids callback issues and is more stable.

    If the problem persists, contact Appian Support with the full error log, Connected System configuration, and Appian version.

Children
No Data