Editing
Troubleshooting of Airtable API
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
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 == Error message: <pre> [type] => INVALID_PERMISSIONS_OR_MODEL_NOT_FOUND [message] => Invalid permissions, or the requested model was not found. Check that both your user and your token have the required permissions, and that the model names and/or ids are correct. </pre> Solution: Verify the permissions of your API token. # Navigate to the [https://airtable.com/developers/web/api/authentication#types-of-token Airtable developer page on Authentication - Airtable Web API]. # From there, proceed to access [https://airtable.com/create/tokens token management]. # Review the permissions of your API token, such as access levels or scopes of bases. == How to fix INVALID_VALUE_FOR_COLUMN == Error message: <pre> [type] => INVALID_VALUE_FOR_COLUMN [message] => Field "欄位名稱" cannot accept the provided value </pre> Solution: Check the data type of field * Go to the Airtable * Select the field which met error e.g "欄位名稱" mentioned in the error message * Menu: Edit field * Choose the proper data type e.g. switch from "short line text" to "number" * {{exclaim}} If the data type of the field is a number and null values are allowed, you need to convert empty strings {{kbd|key=<nowiki>""</nowiki>}} to {{kbd|key=<nowiki>NULL</nowiki>}} before writing to Airtable. Example data: Input data of different data types, whether writing to Airtable is successful or the error message received. <table class="wikitable sortable" style="margin:auto" border="1"> <tr><th title="Field #1">Field value</th> <th title="Field #2">Instruction of field value</th> <th title="Field #3">Single line text</th> <th title="Field #4">Long text</th> <th title="Field #5">Number (Decimal 1,0)</th> <th title="Field #6">Number (Integer 2)</th> </tr> <tr> <td>{{kbd|key=<nowiki>""</nowiki>}}</td> <td>Empty string</td> <td>ok</td> <td>ok</td> <td>INVALID_VALUE_FOR_COLUMN</td> <td>INVALID_VALUE_FOR_COLUMN</td> </tr> <tr> <td>{{kbd|key=<nowiki>"0"</nowiki>}} or {{kbd|key=<nowiki>'0'</nowiki>}}</td> <td>Quoted number</td> <td>ok</td> <td>ok</td> <td>INVALID_VALUE_FOR_COLUMN</td> <td>INVALID_VALUE_FOR_COLUMN</td> </tr> <tr> <td>{{kbd|key=<nowiki>0</nowiki>}}</td> <td>Number without double quote</td> <td>INVALID_VALUE_FOR_COLUMN</td> <td>INVALID_VALUE_FOR_COLUMN</td> <td>ok</td> <td>ok</td> </tr> <tr> <td>{{kbd|key=<nowiki>456</nowiki>}}</td> <td>Integer</td> <td>INVALID_VALUE_FOR_COLUMN</td> <td>INVALID_VALUE_FOR_COLUMN</td> <td>ok</td> <td>ok</td> </tr> <tr> <td>{{kbd|key=<nowiki>78.9</nowiki>}}</td> <td>Number with decimal point</td> <td>INVALID_VALUE_FOR_COLUMN</td> <td>INVALID_VALUE_FOR_COLUMN</td> <td>ok</td> <td>ok</td> </tr> <tr> <td>{{kbd|key=<nowiki>NULL</nowiki>}}</td> <td>NULL value</td> <td>ok</td> <td>ok</td> <td>ok</td> <td> </td> </tr> </table> == How to fix UNKNOWN_FIELD_NAME == Error message: <pre> [type] => UNKNOWN_FIELD_NAME [message] => Unknown field name: "XXX" </pre> Solution: Check the field name # Navigate to your Airtable table. # Verify that the specified field name ("XXX" in this case) exists in the table. # If it doesn't, ensure you're using the correct field name in your query or action. == How to fix NOT_FOUND or INVALID_PERMISSIONS_OR_MODEL_NOT_FOUND == Error message: <pre> ( [error] => NOT_FOUND ) </pre> or <pre> { "error": { "type": "INVALID_PERMISSIONS_OR_MODEL_NOT_FOUND", "message": "Invalid permissions, or the requested model was not found. Check that both your user and your token have the required permissions, and that the model names and/or ids are correct." } } </pre> Solution: Check the URL of API == Further reading == * [https://airtable.com/developers/web/api/introduction Introduction - Airtable Web API] * [https://support.airtable.com/docs/airtable-api-common-troubleshooting Airtable API Common Troubleshooting | Airtable Support] * [https://support.airtable.com/docs/field-type-overview Field Type overview | Airtable Support] * [https://community.airtable.com/t5/development-apis/bd-p/development Development & APIs | Airtable Community] * Publish Blog version: [https://errerrors.blogspot.com/2023/09/troubleshooting-of-airtable-api-errors.html 解決 Airtable API 常見問題] == References == <references/> {{Template:Troubleshooting}} [[Category:Airtable]]
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Exclaim
(
edit
)
Template:Kbd
(
edit
)
Template:Troubleshooting
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
Tools
What links here
Related changes
Special pages
Page information