I am trying to call an API from AWS Lambda, for this I have created a custom connector.
The test connection for the api is working fine. I have added this connector in the power apps and calling the connector on Select of the button --> onSelect= Set(response, 'test-sre1'.testsre1()). I am getting an error stating "The data returned in this response is invalid. Response data should be a valid JSON
Hi , @Soni11
For this error code ,Sorry for that it is hard to find the solution and this is a generally error. I suggest you create a support ticket for professional assistance following the below procedure.
Get Help + Support - Power Platform | Microsoft Docs
Best Regards,
Yueyun Zhang
Thank you for the reply!
I added Accept : application/json and tried again but I am still getting the same error.
Hi , @Soni11
As searched , you can try to add the Accept in your request headers.
Accept : application/json
And for the similar case, you can refer to :
Best Regards,
Yueyun Zhang
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1