Would someone be able to review my code below? I’ve been stuck with it for the past few hours and just cannot get it to work. I’m trying to use the Adalo Collections API to add a record. I’m using PHP to make a cURL request and send it.
This is more of a PHP Question, but I have tried my code with another API and it works. Could it be something to do with Adalo’s authentication process?
I’ve determined this is an issue with using PHP to make the request. After continuing to play I came upon an error from the CDN Adalo are using to process api requests. The response from the CDN is “Application Error”.
The only workaround I’ve found is to use Python rather than PHP. Example of working code:
START
import requests
from requests.structures import CaseInsensitiveDict
Here’s a working PHP example for you.
I think the only thing you’d need to tweak on your original PHP code json_encode the payload instead of using http_build_query given that the API requires JSON.