Logout endpoint
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/logoutto log out users in the developer environment - Use
https://account.docusign.com/logoutto 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.
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_idRedirect_uriwith a value matching one of the client app’s registered redirect URIsresponse_typescoperesponse_modewith a value oflogout_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 theredirect_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:
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_idredirect_uriresponse_typescope
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.