
Hello everyone,
I am working on a Custom Connector in Power Apps to consume an SAP Sandbox OData API from the SAP API Business Hub.
API Used:
https://api.sap.com/api/API_PRODUCT_SRV
Endpoint:
GET https://sandbox.api.sap.com/s4hanacloud/sap/opu/odata/sap/API_PRODUCT_SRV/A_Product?$top=1&$select=Product
Power Apps Call:
POCSAP_API.GetProductMaster({'$select': "Product"})
Issue:
I’m receiving the following error in Power Apps:
Error: POCSAP_API.GetProductMaster failed: The data returned in the response is invalid. Response data should be a valid JSON object.
However, when I test the connector in the Power Apps “Test” tab, the response returns successfully and in proper JSON format.
I have also attached the Swagger definition used for the connector.
Could someone please help me understand why Power Apps is throwing this JSON error even though the connector test shows valid JSON? Any guidance on what could be wrong in the Swagger file or the connector configuration would be greatly appreciated.