Error fetching organization data: TypeError: sdk.organizations is undefined

Hello;

I have an html iframe which I want to include in the custom panel.

But I get the error:
Error fetching organization data: TypeError: sdk.organizations is undefined

Can you give me the documentation how I define this correctly?

this is the code part of it:

// Initialize the SDK
(async function() {
// Create a new instance of the SDK
const sdk = await new AppExtensionsSDK().initialize();

  // Function to fetch and display organization address
  async function displayOrganizationAddress() {
    try {
      // Fetch organization data from the SDK
      const organizationData = await sdk.organizations.getCurrentOrganization();
      const address = organizationData.address;
      const city = organizationData.city;
      const zip = organizationData.zip;
      const street = organizationData.street;

Hi @Sebastia,

Our AppExtensionsSDK (https://www.npmjs.com/package/@pipedrive/app-extensions-sdk) does not provide access to Pipedrive API.

Within an iframe you need to implement (authenticated) request to your app server and list the information you need from Pipedrive API using one of our API SDKs - https://www.npmjs.com/package/pipedrive (NodeJS) or GitHub - pipedrive/client-php: Pipedrive API client for PHP (PHP).

Let me know if you have follow-up questions.

Thank you

Thank you for clarification. This helps to get the right direction…

This topic was automatically closed after 60 days. New replies are no longer allowed.