Skip to navigation

Logout endpoint

View as Markdown

You can redirect a user’s browser window to the logout endpoint to end their authentication session and log them out. After a user has been logged out, they must obtain a new access token to authenticate again before making Docusign API calls.

  • Use https://account-d.docusign.com/logout to log out users in the developer environment
  • Use https://account.docusign.com/logout to log out users in the production environment

When designing your app, you should use the logout endpoint to:

  • Provide your end-users an option to logout.
  • Log users out when they leave your app, if there’s a way to know they left.

The syntax and parameters used for calling this endpoint in your browser are shown below.

https://account-d.docusign.com/logout?client_id={CLIENT_ID}
&redirect_uri={REDIRECT_URI}
&response_type={RESPONSE_TYPE}
&scope={SCOPES}
&response_mode=logout_redirect
ParameterDescription
client_idYour application’s client_id, the same as the integration ID.
redirect_uriSet redirect_uri to either:
  • The URL that the browser should be immediately redirected to, or
  • The URL that the browser should be redirected to after the user authenticates again. See the response_mode query parameter.
response_typeSet to code if using Authorization Code Grant, or token if using Implicit Grant.
scopeA space-delimited list of the scopes your app needs.
response_modeIf set to logout_redirect and the user’s organization’s IDP settings permit it, the service provider session will be ended and the browser will immediately be redirected to the redirect_uri.
If this query parameter is omitted, your application’s Authorization Code or Implicit Grant flow will be followed when someone authenticates if the necessary query parameters were included.

Using the logout method

The logout API method can be used in different ways:

Simple logout

Redirect the user to https://account.docusign.com/logout. If your user logged in with Single Sign On (SSO) and the SSO OAuth Service Provider has been configured with the SAML Single Logout flow, the SSO OAuth Service Provider login session will also be deleted.

The user will be shown the Docusign login/authentication page. If a user authenticates with Docusign, they will be redirected to the Docusign web app.

For this pattern, only the client_id parameter is required.

Logout with redirect to your application

Redirect the user to account.docusign.com/logout, providing the following parameters:

  • client_id
  • Redirect_uri with a value matching one of the client app’s registered redirect URIs
  • response_type
  • scope
  • response_mode with a value of logout_redirect

The service provider authentication session will be deleted.

  • If your user logged in with Single Sign On (SSO) and the service provider has been configured with the SAML Single Logout flow, then the service provider login session will also be deleted.
  • If SSO was not used, then the browser will be redirected to your specified redirect_uri. If SSO was used, then the caveat is that the service provider may not properly redirect the browser back to the redirect_uri.

After the logout, when the browser is redirected to your app’s redirect_uri, a query parameter **error will be appended with value logout_request:

example.com/?error=logout_request

The query parameter confirms that the logout has been processed successfully.

Logout with a later login to your application

Redirect the user to account.docusign.com/logout, providing the following required parameters:

  • client_id
  • redirect_uri
  • response_type
  • scope

The service provider session will be deleted. If your user logged in with Single Sign On (SSO) and the service provider has been configured with the SAML Single Logout flow, then the service provider login session will also be deleted.

Note: All login parameters are supported by this endpoint. If desired, you can simply use your full login request for the logout call.

The browser will be redirected to the service provider authentication page. This is the Docusign page that starts the authentication flow. Later, when a user authenticates, the Authorization Code or Implicit Grant flow will be followed and the user will be authenticated with your application.