Troubleshooting of Airtable API: Difference between revisions
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
Troubleshooting of Airtable API | Troubleshooting of Airtable API | ||
== How to fix API cache == | |||
Problems: [https://community.airtable.com/t5/development-apis/api-get-call-not-retrieving-updated-table-field-data/td-p/69002 API GET call not retrieving updated table field da... - Airtable Community] | |||
Solution: Example PHP code<ref>[https://stackoverflow.com/questions/15493769/is-there-a-way-to-tell-curl-to-not-use-cache php - Is there a way to tell curl to not use cache - Stack Overflow]</ref> | |||
<pre> | |||
$ch = curl_init(); | |||
curl_setopt($ch, CURLOPT_URL, "API_URL_HERE"); | |||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |||
$headers = [ | |||
'Pragma: no-cache', | |||
'Cache-Control: no-cache' | |||
]; | |||
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); | |||
$response = curl_exec($ch); | |||
if(curl_errno($ch)) { | |||
echo 'Error:' . curl_error($ch); | |||
} | |||
curl_close ($ch); | |||
echo $response; | |||
</pre> | |||
== How to fix INVALID_PERMISSIONS_OR_MODEL_NOT_FOUND == | == How to fix INVALID_PERMISSIONS_OR_MODEL_NOT_FOUND == | ||