How to get the URL of an embedded Lucidchart on a Confluence page using Confluence API
Asked by toso:

I am using lucid charts macro to embed a lucid chart on a Confluence page. How can I get the lucid chart url using the Confluence API?  
I tried getting the html of the Confluence page but it only give the lucid chart macro details like macroID, lcId, etc. I also tried the macro API to get the macro details but even that does not seem to contain the url  

Here is the html i receive for the lucid chart embed  

<br />

\<div  
class="ap-container conf-macro output-block"  
data-hasbody="false"  
data-layout="default"  
data-local-id="987e39eb-15d8-4433-9a9a-1b1b20bb20c8"  
data-macro-id="4656a7de-f219-4dd9-8a67-92450c41f256"  
data-macro-name="lucidchart"  
id="ap-com.lucidchart.confluence.plugins.lucid-confluence__lucidchart2918639027826206415"  
\>  
\<div  
class="ap-content"  
id="embedded-com.lucidchart.confluence.plugins.lucid-confluence__lucidchart2918639027826206415"  
\>\</div\>  
\<script  
nonce="c364483fa092405a966f225ca11e095b"  
class="ap-iframe-body-script"  
\>  
//\<!\[CDATA\[  
(function () {  
var data = {  
addon_key: "com.lucidchart.confluence.plugins.lucid-confluence",  
uniqueKey:  
"com.lucidchart.confluence.plugins.lucid-confluence__lucidchart2918639027826206415",  
key: "lucidchart",  
moduleType: "dynamicContentMacros",  
moduleLocation: "content",  
cp: "/wiki",  
general: "",  
w: "",  
h: "",  
url: "[https://lucid.app/ac/confluence/viewer?documentId=e223ec4a-e1ff-4c75-b8fc-54f9d1774b9a\&name=\&macroId=929198f8-c388-41e5-87e2-b8ce136ce7e7\&pages=\&pageCount=1\&type=rich\&width=700\&height=500\&autoSize=1\&align=left\&p_id=42205188\&output_type=display\&autoUpdate=false\&documentToken=v2_1206832ac132d7de2141dfd4e0fa24d8a7f23d403108fb212c36ddc76fc3cead-a%3D175690899%26c%3D45bf4374-9749-339e-9a02-7b81a3ea6659%26d%3De223ec4a-e1ff-4c75-b8fc-54f9d1774b9a%26p%3D42205188\&id=\&confluencePageId=42205188\&embedId=\&ins...](https://lucid.app/ac/confluence/viewer?documentId=e223ec4a-e1ff-4c75-b8fc-54f9d1774b9a&name=&macroId=929198f8-c388-41e5-87e2-b8ce136ce7e7&pages=&pageCount=1&type=rich&width=700&height=500&autoSize=1&align=left&p_id=42205188&output_type=display&autoUpdate=false&documentToken=v2_1206832ac132d7de2141dfd4e0fa24d8a7f23d403108fb212c36ddc76fc3cead-a%3D175690899%26c%3D45bf4374-9749-339e-9a02-7b81a3ea6659%26d%3De223ec4a-e1ff-4c75-b8fc-54f9d1774b9a%26p%3D42205188&id=&confluencePageId=42205188&embedId=&installationId=&lucidAccountId=&lucidProduct=&alignment=&signature=&viewerType=&flags=&url=&xdm_e=https%3A%2F%2Ftosodih262.atlassian.net&xdm_c=channel-com.lucidchart.confluence.plugins.lucid-confluence__lucidchart2918639027826206415&cp=%2Fwiki&xdm_deprecated_addon_key_do_not_use=com.lucidchart.confluence.plugins.lucid-confluence&lic=none&cv=1000.0.0-6dcf00051d35&jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI3MTIwMjA6MzBjZjJhN2ItOTNlNi00MDllLWIzMjktNzcxNWQ1MTNjYTg0IiwicXNoIjoiZDkyOTEzNTAwMDQ4OGYwYmM3MTQzYjllOWU3N2ZiMTg4YmY5NWNlMmRkMzNmNmNiNTVhNGZhZDU0OGU4ODQ4MyIsImlzcyI6IjQ1YmY0Mzc0LTk3NDktMzM5ZS05YTAyLTdiODFhM2VhNjY1OSIsImNvbnRleHQiOnt9LCJleHAiOjE3MjAwMDYxNDQsImlhdCI6MTcyMDAwNTk2NH0.Ssz5i2moNJluqIHSLfPX8_iq0U_t_esdq6_7ljvOmu0)",  
contextJwt:  
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiI3MTIwMjA6MzBjZjJhN2ItOTNlNi00MDllLWIzMjktNzcxNWQ1MTNjYTg0IiwicXNoIjoiY29udGV4dC1xc2giLCJpc3MiOiI0NWJmNDM3NC05NzQ5LTMzOWUtOWEwMi03YjgxYTNlYTY2NTkiLCJjb250ZXh0Ijp7InVybCI6eyJkaXNwbGF5VXJsIjoiaHR0cHM6XC9cL3Rvc29kaWgyNjIuYXRsYXNzaWFuLm5ldFwvd2lraSJ9LCJjb25mbHVlbmNlIjp7ImVkaXRvciI6eyJ2ZXJzaW9uIjoiXCJ2MlwiIn0sIm1hY3JvIjp7Im91dHB1dFR5cGUiOiJkaXNwbGF5IiwiaGFzaCI6IjQ2NTZhN2RlLWYyMTktNGRkOS04YTY3LTkyNDUwYzQxZjI1NiIsImlkIjoiNDY1NmE3ZGUtZjIxOS00ZGQ5LThhNjctOTI0NTBjNDFmMjU2In0sImNvbnRlbnQiOnsidHlwZSI6InBhZ2UiLCJ2ZXJzaW9uIjoiNCIsImlkIjoiNDIyMDUxODgifSwic3BhY2UiOnsia2V5IjoifjcxMjAyMDMwY2YyYTdiOTNlNjQwOWViMzI5NzcxNWQ1MTNjYTg0IiwiaWQiOiIzMzEyNyJ9fX0sImV4cCI6MTcyMDAwNjg2NCwiaWF0IjoxNzIwMDA1OTY0fQ.I0KP6a-csd9F5XgxQvBdS7H-stClm2-FkoLsQXHN-Ak",  
structuredContext:  
'{"confluence":{"editor":{"version":"\\\\"v2\\\\""},"macro":{"outputType":"display","hash":"4656a7de-f219-4dd9-8a67-92450c41f256","id":"4656a7de-f219-4dd9-8a67-92450c41f256"},"content":{"type":"page","version":"4","id":"42205188"},"space":{"key":"\~71202030cf2a7b93e6409eb3297715d513ca84","id":"33127"}},"url":{"displayUrl":"<https://tosodih262.atlassian.net/wiki>"}}',  
contentClassifier: "content",  
productCtx:  
'{"page.id":"42205188","macro.hash":"4656a7de-f219-4dd9-8a67-92450c41f256","autoUpdate":"false","page.type":"page","macro.localId":"987e39eb-15d8-4433-9a9a-1b1b20bb20c8",": = \| RAW \| = :":"pageCount=1\|autoUpdate=false\|align=left\|type=rich\|autoSize=1\|macroId=929198f8-c388-41e5-87e2-b8ce136ce7e7\|instanceId=45bf4374-9749-339e-9a02-7b81a3ea6659\|pages=\|width=700\|documentToken=v2_1206832ac132d7de2141dfd4e0fa24d8a7f23d403108fb212c36ddc76fc3cead-a=175690899\&c=45bf4374-9749-339e-9a02-7b81a3ea6659\&d=e223ec4a-e1ff-4c75-b8fc-54f9d1774b9a\&p=42205188\|documentId=e223ec4a-e1ff-4c75-b8fc-54f9d1774b9a\|updated=1719984187918\|height=500","space.id":"33127","align":"left","type":"rich","autoSize":"1","instanceId":"45bf4374-9749-339e-9a02-7b81a3ea6659","pages":"","user.isExternalCollaborator":"false","height":"500","pageCount":"1","space.key":"\~71202030cf2a7b93e6409eb3297715d513ca84","content.version":"4","page.title":"lucid chart","macro.body":"","macro.truncated":"false","content.type":"page","output.type":"display","page.version":"4","macroId":"929198f8-c388-41e5-87e2-b8ce136ce7e7","macro.fragmentLocalId":"","content.id":"42205188","width":"700","macro.id":"4656a7de-f219-4dd9-8a67-92450c41f256","documentToken":"v2_1206832ac132d7de2141dfd4e0fa24d8a7f23d403108fb212c36ddc76fc3cead-a=175690899\&c=45bf4374-9749-339e-9a02-7b81a3ea6659\&d=e223ec4a-e1ff-4c75-b8fc-54f9d1774b9a\&p=42205188","documentId":"e223ec4a-e1ff-4c75-b8fc-54f9d1774b9a","updated":"1719984187918","editor.version":"\\\\"v2\\\\""}',  
timeZone: "Asia/Calcutta",  
origin: "<https://lucid.app>",  
hostOrigin: "<https://tosodih262.atlassian.net>",  
sandbox:  
"allow-downloads allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-scripts allow-same-origin allow-top-navigation-by-user-activation allow-storage-access-by-user-activation",  
apiMigrations: {  
gdpr: true,  
},  
};  
if (window.AP \&\& window.AP.subCreate) {  
window._AP.appendConnectAddon(data);  
} else {  
require(\["ac/create"\], function (create) {  
create.appendConnectAddon(data);  
});  
}

// For Confluence App Analytics. This code works in conjunction with CFE's ConnectSupport.js.  
// Here, we add a listener to the initial HTML page that stores events if the ConnectSupport component  
// has not mounted yet. In CFE, we process the missed event data and disable this initial listener.  
const __MAX_EVENT_ARRAY_SIZE__ = 20;  
const connectAppAnalytics = "ecosystem.confluence.connect.analytics";  
window.connectHost \&\&  
window.connectHost.onIframeEstablished((eventData) =\> {  
if (!window.__CONFLUENCE_CONNECT_SUPPORT_LOADED__) {  
let events =  
JSON.parse(window.localStorage.getItem(connectAppAnalytics)) \|\|  
\[\];  
if (events.length \>= __MAX_EVENT_ARRAY_SIZE__) {  
events.shift();  
}  
events.push(eventData);  
window.localStorage.setItem(  
connectAppAnalytics,  
JSON.stringify(events)  
);  
}  
});  
})();

//\]\]\>  
\</script\>  
\</div\>


Answers:
author: Laurie Sciutti
body: Hi [@toso](/t5/user/viewprofilepage/user-id/5535939) and welcome to the Community! Maybe this will point you in the right direction: <https://lucid.readme.io/docs/welcome#apis> If not, I would recommend either emailing [support@lucidchart.com](mailto:support@lucidchart.com) or submitting a [Support Request](http://support.lucidchart.com/).


Tags: confluence-data-center

confluence-server

data-center

server