Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Getting access token using code, client id and client secret gives the error

New Here ,
May 11, 2018 May 11, 2018

Hi,

I have been getting access_token using this method, but today its not working. It returns an error error.JPG

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

361
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation