Skip to main content

I’m trying to create a data connector for getting the documents associated to an account using this endpoint:

https://api.lucid.co/accounts/me/documents/search

But I get a 403 error, so the performDataAction is not fired. Please, what could be wrong?

Extension registered action code:

  client.registerAction("getAccountDocumentlist", async () => {
const triggerOauth = await client.oauthXhr("lucid", {
url: "https://api.lucid.co/accounts/me/documents/search",
headers: {
"Lucid-Api-Version": "1",
"Content-Type": "application/json",
},
data: "{}",
method: "POST",
});
console.log("triggerOauth", triggerOauth);
const result = await client.performDataAction({
dataConnectorName: "dataconnector",
actionName: "GetAccountDocumentList",
actionData: { message: "GetAccountDocuments" },
asynchronous: true,
});
console.log(result);
}); -

manifest.json  content:

...
"oauthProviders": "
{
"name": "lucid",
"title": "Lucid",
"authorizationUrl": "https://lucid.app/oauth2/authorize",
"tokenUrl": "https://api.lucid.co/oauth2/token",
"scopes": "
"folder",
"lucidchart.document.content:readonly",
"lucidchart.document.content:admin.readonly"
],
"domainWhitelist": "
"https://api.lucid.co"
],
"clientAuthentication": "clientParameters",
"faviconUrl": "https://cdn-cashy-static-assets.lucidchart.com/marketing/images/LucidSoftwareFavicon.png"
}
],
"dataConnectors": "
{
"name": "dataconnector",
"oauthProviderName": "lucid",
"callbackBaseUrl": "http://localhost:3001/?kind=action&name=",
"dataActions": {
"GetAccountDocumentList": "GetAccountDocumentList",
"Poll": "Poll",
"HardRefresh": "HardRefresh",
"Patch": "Patch"
}
}
]
...

I have to add that the lucid.credentials.local contains the correct clientId and clientSecret that have been set in the application declaration OAuth2 tab with the correct Redirect URIs:

https://extensibility.lucid.app/packages/<myAppId>/oauthProviders/lucid/authorized

Best regards.

 

 

 

 

 

Hey Michel, I’m Alec, I’m a developer here at Lucid. Sorry about the delay in response, your message initially slipped through our system without notifying us, and then I have been looking into your issue.

In our public repo we have some example applications like this one that show how something like this can be set up. I compared your code to our example, and I don’t think your problem is with your code, configuration, or scopes.

My best guess, with the 403 error code you keep receiving, is that you might not have Enterprise Shield on your Lucid account. Here is some documentation we have on Enterprise Shield, if this isn’t a term you’ve heard before I would be almost certain this is your problem, since this endpoint is only available to accounts with Enterprise Shield enabled.

If this isn’t the case, and you do have Enterprise Shield enabled, reach back out and I can continue investigating your problem. Hope this helps!


Reply