I have an issue, I'm trying to send a post request to create a KYC page in MANGOPAY and I need to pass a binary code or a raw file.
Need help to know how to send the raw file as I get an error 404.
const url = `paymentApi/createkyc/${id}/${file}`;
this error:
cloudfunctions.net/api/payment/createkyc/Id/[object%20File] 404
You are sending the binary data as part of the URL, which is most likely not what you want to do.
As I do not know how to find the documentation for the API you are using (createkyc
is not listed on https://docs.mangopay.com/endpoints/v2.01/clients for example), it is quite difficult to help.
Typically, for REST APIs, you use HTTP POST and send the binary data as the "body" of the request and not as part of the URL.
It is also worth noting that MangoPay seems to provide a few client libraries, that you could maybe check if there is one for your programming language (PHP?).