Validation Error 400 "while substituting the templates"

MY ISSUE:
1- I am facing the validation error 400 on HTTP get request , but if i update or Installing app first time it validate successful and then when i go back to settings to view my configuration and want to update it validates failed. This happening on internal API (e.g https://api.freshchat.com/v2/channels) & any 3rd party API.

2- It works on my local environment , In fact i hit multiple times my validation process after and before the installation it works perfectly.

1- Image Attached that shows console error.

MY TRIES:
1- I visit community for the solution i got multiple answers on same issue. I tried, but unfortunately didn’t get the positive response.

2- Also run in INCOGNITO to avoiding cache but issue still persists.

My CODE:
Same request method goes with 3rd party API & issue persists on both API’s.
var url = https://api.freshchat.com/v2/channels;
let options = {
headers: {
“Authorization”: Bearer ${fcToken},
“Content-Type”: “application/json”
}
};

2 Likes

Hi @Furqan_Mehboob,
Good Day!
Have you whitelisted the domain? and due to security issue we blocked the template literal parsing in body, you are allowed to use only in header.

I hope it helps :slight_smile:
Thanks

2 Likes

Hi @Santhosh
Thanks for quick reply

I already have whitelisted domains as mentioned in the article here is my domains list
“whitelisted-domains”: [
https://api.messagemedia.com”,
“https://*.freshchat.com”,
https://staging-fcmessagemedia.codupcloud.com”,
https://fcmessagemedia.codupcloud.com”,
https://codupio1.freshchat.com
]

& i tried your mentioned solution of template literal parsing and fix it but unfortunately error 400 still persists,I am not having any post request to send body so here is my GET request code.

       var url = 'https://api.freshchat.com/v2/channels';
            let options = {
                headers: {
                    "Authorization": `Bearer ${fcToken}`,
                    "Content-Type": "application/json"
                }
            };
            client.request.get(url, options).then(*********

I would like to let you know this is my market place app so please try your best to help me out quickly that would be highly appreciated.

3 Likes

Hi @Furqan_Mehboob,
Possible can you please share me the app Zip, I will investigate what is wrong with that and get back to you at the earliest

Thanks
Santhosh

1 Like

@Furqan_Mehboob Could you please share your iparams file contents?

1 Like

Here is the app zip.

2 Likes

@Santhosh @arshath.h
Have you found my drive link?

1 Like

@Furqan_Mehboob,
I am investigating it, please allow some time and I will get back to you
Thanks

2 Likes

@Furqan_Mehboob,
I tried with your code and I am not able to reproduce this issue from our side,
I request you to book a call with us on Calendly - Freshworks Developer Relations to debug further.
CC: @Raviraj @Saif

Thanks,
Santhosh

3 Likes

Hi @Santhosh

Can you please reschedule the call or any other way for the solution because issue still persists.

Thanks.

1 Like

@Furqan_Mehboob,
You can reschedule it via Calendly - Freshworks Developer Relations

Thanks

1 Like

As per latest update from @Furqan_Mehboob, we scheduled two calls in which we provided all the info required. We haven’t heard back from any devrel since then. Can I please get an update on this at the earliest as this is blocking our app from working correctly.

@Saif @velmurugan @Hem Can you guys please look into this for me? Let me know if anything is required from our end to resolve this.

1 Like

Hi Yusra & Furqan,
Thanks for being patient. I had the chance to look into the issue that is logged on our side. Good thing is that it’s already picked up by engineering :slight_smile: Unfortunately, this hasn’t reached our live systems yet. I have notified the stakeholders on our side to fast track the same.

2 Likes

Hi folks,
The fix has been merged. Let me know if you still face the issue :slight_smile: !

4 Likes

Hi @Hem

Thank You , Working fine now. :slight_smile:

4 Likes