Skip to navigation

Authentication

View as Markdown

Before your application can make calls to the Click API, it must authenticate and obtain an access token. You must submit this access token, which proves your app’s identity and authorization, with each request.

You can use any supported OAuth2 authentication workflows to obtain an access token and make calls to the Click API. Service integrations may use Authorization Code Grant or JSON Web Token (JWT) Grant, while mobile apps may use Implicit Grant. See Platform Authentication for an overview of these grants and how to choose which grant to use for your app.

Required scopes

The only difference between authenticating with the Click API and the eSignature API is that when you request an access token for your OAuth2 scenario, you must request a special Click API scope during the authentication process. You can combine some Click API scopes with eSignature scopes.

You can choose from the following Click API scopes:

ScopeDescription
click.manageEnables most elastic template operations, including creating and updating elastic templates; getting a list of elastic templates; creating user agreements; getting a list of users; and retrieving responses.
click.sendEnables checking to see if a user has agreed to a elastic template, as well as retrieving an agreement or PDF file for an agreement. No other operations. This scope provides access to a subset of the functions available under the manage scope. The only function available under the send scope that is not also available under the manage scope is ClickWraps:createHasAgreed.
Note: Although the scope is named send, elastic templates are not sent to recipients. Instead, they are embedded in a web page or app.
  • Using Authorization Code Grant, you request scopes when you make the authorization code request.
  • Using Implicit Grant, you request scopes when you make the access token request.
  • Using JWT Grant, you request scopes in the body of the JWT token.

Authentication examples

The following examples show how to authenticate by using each grant type.

Authorization Code Grant

Request URL:

https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature%20click.manage%20click.send&client_id=7c2b8d7e-xxxx-xxxx-xxxx-cda8a50dd73f&state=a39fh23hnf23&redirect_uri=http://example.com/callback

Implicit Grant

Request URL:

https://account-d.docusign.com/oauth/auth?response_type=token&scope=signature%20click.manage%20click.send&client_id=7c2b8d7e-xxxx-xxxx-xxxx-cda8a50dd73f&state=a39fh23hnf23&redirect_uri=http://example.com/callback/

JSON Web Token (JWT) Grant

Request URL:

https://account-d.docusign.com/oauth/auth?response_type=code&scope=signature%20click.manage%20click.send&client_id=7c2b8d7e-xxxx-xxxx-xxxx-cda8a50dd73f&state=a39fh23hnf23&redirect_uri=http://example.com/callback

JSON request body:

{
"iss": "5c2b8d7e-xxxx-xxxx-xxxx-cda8a50dd73f",
"sub": "464f7988-xxxx-xxxx-xxxx-781ee556ab7a",
"iat": 1523900289,
"exp": 1523903289,
"aud": "account-d.docusign.com",
"scope": "signature click.manage click.send"
}

Next steps: