Why am I encountering errors while fetching data from Pipedrive using Pipedream Connect and how can I resolve these issues?

This topic was automatically generated from Slack. You can find the original thread here.

Hello,

I’m currently integrating with Pipedrive using Pipedream Connect and Pipedream OAuth to retrieve data for leads, deals, and activities. For the user configuration, I’m using localhost URLs for the Webhook URI, Success Redirect URI, and Error Redirect URI while setting up the user account via Connect.
However, when I try to fetch data, I encounter the following errors:

Error fetching leads: 400 - {“error”:{“domain”:[“not allowed for this app”]}}
Error fetching deals: 400 - {“error”:{“domain”:[“not allowed for this app”]}}
Error fetching activities: 400 - {“error”:{“domain”:[“not allowed for this app”]}}

Could you please help me understand what might be causing this issue and how I can resolve it?

Thank you!

Hi , you can configure the allowed origin in Create Token step.

You can access examples in Pipedream Connect Examples repo, you can see the allowed domains are configured here: pipedream-connect-examples/connect-react-demo/.env.example at master · PipedreamHQ/pipedream-connect-examples

It sounds like that error is coming back from makeProxyRequest(). Can you share an example of a proxy request payload?

Hello @U02A06JPKEH
Thank you for sharing the insights.

@U02A06JPKEH I will share the proxy request payload in some time.

This is how I am making proxy request.

#for getting token
pipe_dream_token_url = "https://api.pipedream.com/v1/oauth/token"
oauth_response = [requests.post](http://requests.post)(
        config.pipe_dream_token_url,
        headers={"Content-Type": "application/json"},
        json={
            "grant_type": "client_credentials",
            "client_id": config.pipe_dream_client_id,
            "client_secret": config.pipe_dream_client_secret
        }
    )
for data fetching
pipedrive_api_url = "https://api.pipedrive.com/v1/" 

target_url = f"{pipedrive_api_url}deals?limit={limit}&start={start}"
        
        # Add date filters if available
        # if date_key and date_end_key:
        #     target_url += f"&{date_key}={start_ts}&{date_end_key}={end_ts}"
        
        # Base64 encode the URL (URL-safe encoding without padding)
        encoded_url = base64.urlsafe_b64encode(target_url.encode()).decode().rstrip("=")
        
        try:
            response = requests.get(
                f"{config.pipe_dream_request_url}{config.project_id}/proxy/{encoded_url}",
                headers={
                    "Authorization": f"Bearer ctok_591535217b297bb03fbb30a6168f685c",
                    "x-pd-environment": "development"
                },
                params={
                    "external_user_id": external_user_id,
                    "account_id": account_id,
                }
            )

Hello The error has changed after specifying the allowed origins and I am now getting this error.

Error fetching deals: 500 - {“error”:"Unexpected error, please reach out to our team at 404: Not Found - Pipedream

Leo, I’m going to be offline today, but can you take a look at the base Pipedrive domain they’re targeting in that request and make sure that it’s defined as an Allowed Domain in the Pipedrive app config on our end? It’s definitely not related to allowed_origins on the Connect token.

cc FYI

Yes sure , I’ll take a look into this today

Hey , I’ve added [api.pipedrive.com](http://api.pipedrive.com) in the allowed domains on Pipedream end. Could you try again to see if the error is still there?

Hello Thank you for adding the domain for [api.pipedrive.com](http://api.pipedrive.com) to the allowed list in Pipedream. That resolved the issue, and I’m now able to successfully retrieve data from Pipedrive.

I’m currently working on connecting Shopify via Pipedream, but I’m encountering the same error message I previously saw with Pipedrive: “Domain not allowed for this app.” It appears that the Shopify API domain also needs to be added to the allowed list in Pipedream to resolve this.
Looking ahead, I plan to integrate WooCommerce, BigCommerce, and Wix as well. Could you please check that the necessary domains for these platforms (Shopify, WooCommerce, BigCommerce, and Wix) are all added to the allowed list?

I am attaching a screenshot for Shopify.

I appreciate your continued support—thank you!

Hi , could you share
• the specific shopify app (.i.e shopify (oauth), shopify, etc…)
• the domains you’re using for shopify

Let me share those

I have tried with all 3. Shopify OAuth, Shopify, and Shopify Partner. All 3 are producing the same error. My store is a test store for now and this the URL of store. https://microtanalytics.myshopify.com/

Please let me know if you need any other information.

Hey , I’ve added the official domain [myshopify.com](http://myshopify.com) to both Shopify and Shopify OAuth, could you try again?

Sure. Let me check and get back to you.

Hello I am still getting the below error.

GraphQL Error: 400 - {"error":{"domain":["not allowed for this app"]}}

Got it . I’ll try to reproduce on my side and get back to you

Thank you. Can I expect it to be today?

Hey , I won’t be able to commit today. I’ll get back to you as soon as possible

Alright. Thanks for the update .