Cannot authorize docusign with freshservice custom app

Hi Devs,

I’m trying to authenticate docusign with freshservice custom app and couldn’t complete the process as the authorize button is not working as shown in the image

The config used:

{

"client_id": "<integration key>",

"client_secret": "<secret key>",

"authorize_url": "https://account-d.docusign.com/oauth/auth",

"token_url": "https://account-d.docusign.com/oauth/code",

"options": {

"scope": "signature"

},

"token_type": "account",

"oauth_iparams": {

}

}

URL redirect has been configured in docusign app

Could anyone suggest how to fix the above issue?

Hi @Kiran
Can you share the console logs as well?
Also can you check if you have added https://account-d.docusign.com to the list of whitelisted-domains in your app’s manifest.json file

Hello @Kiran

Besides what @Debjani already asked for, do you mind confirming which page/location in Freshservice the screenshot is taken from? Does your app expect each user to separately authorize themselves or only expect the administrator to authorize during installation?

Hi @Debjani_Chatterjee ,
I am using fdk 9.0.0 which doesn’t need whitelisting according to the docs. Also, I don’t see any console log as the button click is not triggering anything. Below are the fdk logs:

2023-04-15 23:05:27.803 +1000 [debug] (e[34mdata.jse[0m) e[31mRead {"fs_doc_101_101_freshservice":{"fs_doc_101_101_oauth_iparams":{},"fs_doc_101_101_oauth_appstate":"eed405e2-f87d-474e-87e2-c56399673755"}}e[0m
2023-04-15 23:05:27.803 +1000 [debug] (e[34miframe.jse[0m) e[31mResponding to product with {"configs":{},"displayName":"fs-docusign","product":{"freshservice":{"location":{"ticket_sidebar":{"url":"agent/index.html","icon":"agent/styles/images/icon.svg"}},"requests":{"authenticate":{}}}},"features":["db","oauth"],"actions":false,"omni":false,"products":["freshservice"],"platform":"2.3","isInstall":false,"isAuthorized":false,"v2":[{"id":1,"version_id":1,"configs":{},"displayName":"fs-docusign","placeholders":{"ticket_sidebar":{"url":"http://localhost:10001/iframe/oauth/local-testing-oauth-msg.html","icon":"styles/images/icon.svg"}}}]}e[0m

@satwik : This is loaded in ticket sidebar.
Manifest details:

{
  "platform-version": "2.3",
  "product": {
    "freshservice": {
      "location": {
        "ticket_sidebar": {
          "url": "index.html",
          "icon": "styles/images/icon.svg"
        }
      },
      "requests": {
        "authenticate": {}
      }
    }
  },
  "engines": {
    "node": "14.21.1",
    "fdk": "9.0.0"
  }
}

Thanks for sharing the manifest details @Kiran

Could you kindly expand on what you mean when you say the “Authorize” button is not working? Is it also possible to share the browser console logs related to when you try this and it doesn’t seem to work?

Hi @satwik , Sorry for the late response. I tried with the GitHub oAuth method which was working on old FDK is failing now.
I think it might be the config/setup issue with latest fdk/platform versions. Could you please share any oAuth sample app which was developed for latest fdk ?

Thanks,
Kiran

Hey @Kiran,

Check out the GitHub OAuth sample app - GitHub - freshworks-developers/octocat-service-app at pf2.3

Where the config/oauth_config.json would be like -

{
  "client_id": "your client id",
  "client_secret": "your client secret key",
  "authorize_url": "https://github.com/login/oauth/authorize",
  "token_url": "https://github.com/login/oauth/access_token",
  "options": {
    "scope": "repo"
  },
  "token_type": "account"
}

And one thing I noticed from your manifest.json that app is using Node14, Can you confirm if you have updated the Node to Node18 and fdk version is 9.0.0.

I have followed the above pattern and updated the node to 18 as well. Still the same issue.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.