Copy link to clipboard
Copied
Hi,
I have been getting access_token using this method, but today its not working. It returns an error
although it has been working properly before today.
I am using this code:
var context = new AdobeSignSdk.Context();
var oAuthApi = new AdobeSignSdk.OAuthApi(context);
var oAuthModel = AdobeSignSdk.OAuthModel;
//Fetch the access token.
var accessTokenRequest = new oAuthModel.AccessTokenRequest();
accessTokenRequest.setClientId("########");
accessTokenRequest.setClientSecret("########");
accessTokenRequest.setRedirectUri("https://example.com");
accessTokenRequest.setCode("######");
accessTokenRequest.setGrantType("authorization_code");
oAuthApi.getAccessToken(accessTokenRequest)
.then(function (accessTokenResponse) {
console.log(accessTokenResponse.getAccessToken())
})
.catch(function (apiError) {
console.log(apiError);
});
help will be highly appreciated. Please reply me as soon as possible.
Regards,
Muhammad Mohsan
Have something to add?