Skip to main content
Newcomer
September 9, 2026
Question

I am getting an error Misused header name 'Authorization' with DocuSignClient

  • September 9, 2026
  • 1 reply
  • 24 views

I am converting code from the legacy authentication to OAuth and using the new DocuSignClient in .net.  I am able to get the Access Token, but when I call the CreateEnvelope, it returns Misused header name, 'Authorization'.

My code (in VB.NET)

            Dim docuSignClient = New DocuSignClient("https://demo.docusign.net/restapi")
            docuSignClient.Configuration.AddDefaultHeader("Authorization", "Bearer " & accessToken)


            Dim envelopesApi = New EnvelopesApi(docuSignClient)

            Dim envelopeDefinition = GetEnvelopeDefinition()

            Dim results = envelopesApi.CreateEnvelope(clientID, envelopeDefinition)
 

 

1 reply

Docusign Employee
September 18, 2026

Hello Team

 

Try adding the bearer token directly to Configuration.DefaultHeader instead of calling AddDefaultHeader:

Dim docuSignClient = New DocuSignClient("https://demo.docusign.net/restapi")
docuSignClient.Configuration.DefaultHeader("Authorization") =
"Bearer " & accessToken.Trim()

Dim envelopesApi = New EnvelopesApi(docuSignClient)
Dim results = envelopesApi.CreateEnvelope(accountId, GetEnvelopeDefinition())

Make sure accessToken contains only the token, without an existing Bearer prefix, and that accountId is the Docusign account ID rather than the integration key. This is the header configuration pattern shown in the Docusign .NET SDK documentation.

 

BestRegards

Sai