LeadConnector error: Raw request failed. Problem executing your request. Invalid JWT
its a action application in zapier i have used xero as an action app which is fetching new quotes from an organization and making it an object for each order i want to use api request(beta) inside lead connector to post that directly to my crm that creates an opportunity.
Page 1 / 2
Hi @Talha1122
For us to have more context, posts screenshots with how the Zap step is configured in EDIT mode for the ‘Action’ tab section.
@Talha1122
You likely need to add info to the Body for the API request based on the API endpoint documentation you reference to configure the Zap step.
Super helpful. Very much appreciate the thorough response. +1 that the API V2 is used and that we can use the API Request action with it.
@Talha1122
If you need help, consider hiring a CertifiedZapierExpert from the directory: https://zapier.com/experts
Looks like you have a line break after your Version value (2021-07-28), which should be removed.
This is not a valid Body structure as defined by the API endpoint docs:
@Troy Tessalone I have been dealing with this same exact issue. The problem is, Zapier can’t automatically provide the authentication Header as that token expires / changes every 24 hours. I assume Zapier is just providing the API key in that header which is conflicting with the Oauth Acess Token that the API call is actually looking for. Is there a way to turn off the automatic authentication header in Zapier?
@TitanWashing
Is there a way to turn off the automatic authentication header in Zapier?
Hi @Troy Tessalone, to piggy back off of @TitanWashing’s response -- the action should be dynamically taking the latest authentication header from the account that is connected to the zap, but it seems like it’s not, so an expired auth token (if any at all) is being passed to the endpoint which is causing the failure.
I can replicate the issue. Is there a formal process to have a ticket submitted for zapier to look at this?
It would be a nice feature to be able to turn off the auto auth-header (per zap of course) and be able to just grab our latest token from our table where it’s stored and updated daily. The issue comes in when the 2 headers are conflicting with each other.
@TitanWashing
Feedback and feature requests can be submitted via a ticket to Zapier Support to be logged properly: https://zapier.com/app/get-help
Thank you @Troy Tessalone
@TitanWashing You should be able to accomplish that with the webhook action. Not much different than the API Request action. Use a zap (maybe code) to grab the token from whatever table you’re storing it in and then pass that to the webhook action.
The reason I’m personally not a fan of the webhook route is because it looks like you need to register a custom app with LeadConnector to be able to generate the oauth token. The appeal of the API Request action for me was that it’s supposed to handle the generation of the token for you automatically since the zap is persistently connected to the account/location you choose. I imagine zapier must have code under the hood that’s generating the token every 24hrs so that these leadconnector zaps work. There must be a breakdown somewhere of passing that token they are already generating to the API Request action. Thoughts?
Problem is, GHL’s API 1.0 has been sunset and is no longer supported. They (GHL) have advised to stop using 1.0. We really need Zapier to get onboard with 2.0.
@TitanWashing yep, you’re right -- I should have tested myself before responding here. Sorry about that.
Referencing the V1 endpoint returns:
Domain did not match expected domain filter(s) `api.gohighlevel.com,services.leadconnectorhq.com`.
It looks like LeadConnector is denying calls to V1 endpoints. Using api.gohighlevel.com returns not found andservices.leadconnectorhq.com is the V2 endpoint that requires the oAuth token.
What I’m not clear on is if LeadConnector is denying calls to V1 endpoints, then that implies the Zapier integration is using V2 for all of their current actions, no? If it’s using V2, then we shouldn’t be getting the Invalid JWT response when we use the API Request action is used. Only other scenario I can think of is Zapier <> LeadConnector have a private integration that still allows the V1 endpoints to be called.
@TitanWashing Confirmed Zapier is using a private API for the integration. The API Request action will not work.
Only option is the webhook action. I think you basically need a way to generate and store the latest Oauth token and use that in your zapier webhook. Would be curious to hear whether you have created a simple way to generate and store these oAuth tokens.
I have created a private-use app in the GHL developer marketplace. I have also coded a process into the authorization landing page for this app that creates custom values in GHL to store these tokens. Additionally, I have an automation in GHL that updates these tokens every day and pushes the updated tokens out to a table in Zapier automatically. Now if Zapier could get setup to use the new Oauth for GHL’s API v.2 these tokens would come in very handy. As-is I have found workaround through some private apps and webhooks to do most of what I need but native integrations are always preferred when available.
i have used this url for endpoint
https://services.leadconnectorhq.com
/opportunities/
and for header autorization : bearer i have got the api key from my crm highlevel.
so please help me why its showing that invalid JWT issue.
@Talha1122
Including this note:
NOTE: For us to have current context, you will need to post updated screenshots with how your Zap steps are configured in EDIT mode, along with encountered errors.
Failed to create a http request in LeadConnector
Raw request failed. Problem executing your request: 2021-07-28 is not a legal HTTP header value
@Talha1122
The feedback was to only remove the Authorization header.
Try removing the Authorization header as it is already included per the section indicator.
API docs indicate 2 Headers are required.
Zapier should automatically include the Authorization Header as indicated.
You would need to configure the Version Header.
NOTE: For us to have current context, you will need to post updated screenshots with how your Zap steps are configured in EDIT mode, along with encountered errors.
Failed to create a http request in LeadConnector
Raw request failed. Problem executing your request: version header was not found.
got this issue when i removed all headers and when i used that 2021-07-28 it says not a valid header
@Talha1122
Try removing the Authorization header as it is already included per the section indicator.
This is the API endpoint link, but it is not the link to the API endpoint documentation that shows the requirements for the API endpoint request, such as method, headers, parameters, etc.
api endpoint used. https://services.leadconnectorhq.com /opportunities/