3
SAP BTP Destination: Destination Unavailable Error for C4C
complete
A
Atakan Tokgöz
We've established the destination as below and when we check connection response is successful:
Connection to "C4C_ODATA" established. Response returned: "307: Temporary Redirect"
URL:
https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi

I can see the destination, but when I click I receive the error below:

Here's the request details:
Request URL:
https://btp-XXXXXXXXXX-platform.appgyver.black/destinations_api/v1/destination/C4C_ODATA
Request Payload:
{url: "", headers: {Accept: "application/json, text/plain, */*"}, method: "get"}
Response:
{"status": 500, "statusText": "Internal Server Error", "headers": {"content-type":"application/json; charset=utf-8","etag":"W/\"7c-juHELD4z/abrcq/AO4ayZhQVISo\""}, "responseText": "{\"error\":{\"code\":\"ERROR\",\"message\":{\"lang\":\"en\",\"value\":\"Unauthorized: The service 'c4codataapi' is not assigned to you.\"}}}"}
When I checked the C4C OData Monitor I saw the request as below:

The issue here is that when using a technical user (as BTP Destination recommends) C4C does not accept requests without a valid path. To get a successful response a collection needs to be added.
What I mean by that:
/sap/c4c/odata/v1/c4codataapi/ActivityCollection
is OK
/sap/c4c/odata/v1/c4codataapi/$metada
is OK
/sap/c4c/odata/v1/c4codataapi/
not OK
When doing the test call, AppGyver should include $metadata to then so the call could be successfully authorized.
Log In
K
Kirill Leventcov
complete
A
Atakan Tokgöz
Kirill Leventcov Sorry, I just saw your message, it is indeed working!
K
Kirill Leventcov
Hi Atakan Tokgöz,
We have just released an update that was meant to fix your issue. Would you mind checking if everything is working on your end?
R
Raj Pawan Gumdal
Kirill Leventcov: Hi Kirill, I am using SAP Build Apps on BTP and I am still having this issue. Can you please confirm if this fix was patched on the latest SAP Build Apps? Thanks.

A
Atakan Tokgöz
Raj Pawan Gumdal: c4codataapi metadata is huge, it is exceeding the error timeout that is why you see the error but it is still actually fetching. Keep clicking a few times then wait, it'll appear. At least it is for me.
Also for your destinations I'd recommend the c4codataapi's child apis like customer, ticket etc.
K
Kirill Leventcov
in progress
K
Kirill Leventcov
Hi,
Thanks a lot for reporting! We have identified the issue and will start working on this soon.