How to log in to Docusign from your app
This topic demonstrates how to log in to Docusign from your app.
Required data
Running the code in this how-to requires this data:
Step 1. Obtain your OAuth token
To make the API call shown in this how-to, you need a valid OAuth access token. The Docusign iOS SDK supports access tokens for two different OAuth grant types: Authorization Code Grant and JSON Web Token (JWT) Grant. Choose the OAuth grant type appropriate for your scenario. See Authenticate for guidance on your options to get an OAuth token.
Step 2. Enable SDK token storage in Keychain
To enable the SDK to store access tokens and refresh tokens in the Apple Keychain, insert the following entry into your application’s Info.plist file:
Step 3. Log in to Docusign
Use the method shown to log in to Docusign. Be sure to substitute {ACCESS_TOKEN} for the token obtained in Step 1. This method also includes two optional parameters:
refreshToken: You can use a refresh token to get a new access token after the access token expires. This token is included in the authentication response in Step 1.expiresIn: Adateobject that indicates the expiration date of the access token. If you do not wish to include these parameters, you can set these values tonil.
Expected response
If login is successful, a DSMAccountInfo object will be returned. You will now be able to make API calls.