Closed Karthikrajt closed 3 years ago
Hi @Karthikrajt, for retrieving authToken, you can refer to https://developers.docusign.com/platform/auth/authcode/authcode-get-token/ In DocuSign Android SDK, for convenience, we provide an api to login. val authenticationDelegate = DocuSign.getinstance().getAuthenticationDelegate() authenticationDelegate .login(requestCode: Int, context: Context, listener: DSAuthenticationListener)
Thanks for your response. Do we have any sample code for getting an auth token from the android application?
@Karthikrajt Below is the code to get the access token with Authorization Code Grant: 1) Get the OAuth Client Id/Integration key, secret key and redirectUri from your account. (Please refer to https://developers.docusign.com/platform/auth/authcode/authcode-get-token/ on how to retrieve the clientId, secretKey and redirectUri from your account). 2) While initializing the DocuSign SDk, pass these values as shown in below DocuSign.init( context, clientId, secretKey, redirectUri, DSMode.DEBUG ).setEnvironment(environment)
3) Then you can call login method on authenticationDelegate as show in in below code.
DSAuthenticationDelegate authenticationDelegate = DocuSign.getInstance().getAuthenticationDelegate(); authenticationDelegate.login(REQUEST_LOGIN, this, new DSAuthenticationListener() { } 4) This will open the OAuth login screen. Enter your username and password and you should be able to login.
How to get authToken