Help

Re: Get Request From Voiceflow API

1031 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Tutto
4 - Data Explorer
4 - Data Explorer

Hello everyone, Hope you guys can help me out here.

I am trying to fetch some information from Airtable through an Get request API block in Voiceflow. When the parameter field is empty I get a 200 success code but it retrieves all of the information. I want to fetch the information depending on a variable. To do that I type a filterByFolmula in the parameter field and I get 422 error. Does anyone knows how to solve this? I will really apreciate it


{
"error": {
"type": "AUTHENTICATION_REQUIRED",
"message": "Authentication required"
},
"VF_STATUS_CODE": 401,
"VF_HEADERS": {
"access-control-allow-headers": "authorization,content-length,content-type,user-agent,x-airtable-application-id,x-airtable-user-agent,x-api-version,x-requested-with",
"access-control-allow-methods": "DELETE,GET,OPTIONS,PATCH,POST,PUT",
"access-control-allow-origin": "*",
"airtable-datacenter-regions": "us-east-1",
"connection": "close",
"content-length": "80",
"content-type": "application/json; charset=utf-8",
"date": "Sun, 29 Oct 2023 16:14:22 GMT",
"etag": "W/\"50-8xYAvLBWleFLl/buYhG+M42uVZo\"",
"server": "Tengine",
"set-cookie": "AWSALB=hr79Wmd+gxOkBjaUeEX29MXjyqj5F+WNj3jIGaZ9ZozdF5bgsluBEgftNwRG8sm9OohsFZ6GNYk/4RD6GpXBYI2xT9ELvYSne/PJXm5/FC/ADq32mpn5cuVBxUFk; Expires=Sun, 05 Nov 2023 16:14:22 GMT; Path=/, AWSALBCORS=hr79Wmd+gxOkBjaUeEX29MXjyqj5F+WNj3jIGaZ9ZozdF5bgsluBEgftNwRG8sm9OohsFZ6GNYk/4RD6GpXBYI2xT9ELvYSne/PJXm5/FC/ADq32mpn5cuVBxUFk; Expires=Sun, 05 Nov 2023 16:14:22 GMT; Path=/; SameSite=None; Secure, brw=brwD1JmLsOMyjSOxa; path=/; expires=Tue, 29 Oct 2024 16:14:22 GMT; domain=.airtable.com; samesite=none; secure",
"strict-transport-security": "max-age=31536000; includeSubDomains; preload",
"vary": "Accept-Encoding",
"x-content-type-options": "nosniff",
"x-frame-options": "DENY"
}
}

2 Replies 2
Devinder_Singh
6 - Interface Innovator
6 - Interface Innovator

@Tutto The issue is that you're trying to use filterByFormula parameter with "get record" API. It works only with the "list records" API. 

This URL format is for "get record" https://api.airtable.com/v0/app12345677/Booking/rec1243245,  instead it should be https://api.airtable.com/v0/app12345677/Booking

yogesh_tejwani
4 - Data Explorer
4 - Data Explorer

@Devinder_Singh I am facing the exact issue. But I am able to get table data once after adding token next to bearer. 2nd time onwards I get error 401. How do I fix this?

{
"error": {
"type": "AUTHENTICATION_REQUIRED",
"message": "Authentication required"
},
"VF_STATUS_CODE": 401,
"VF_HEADERS": {
"access-control-allow-headers": "authorization,content-length,content-type,user-agent,x-airtable-application-id,x-airtable-user-agent,x-api-version,x-requested-with",
"access-control-allow-methods": "DELETE,GET,OPTIONS,PATCH,POST,PUT",
"access-control-allow-origin": "*",
"airtable-datacenter-regions": "us-east-1",
"connection": "close",
"content-length": "80",
"content-type": "application/json; charset=utf-8",
"date": "Mon, 26 Feb 2024 14:28:32 GMT",
"etag": "W/\"50-8xYAvLBWleFLl/buYhG+M42uVZo\"",
"server": "Tengine",
"set-cookie": "AWSALB=OFknkMe3v6jbDYjuAYckh8dqk9hf8RxUO/vaFLqyrKq6NHU5AyKc/SjlK5yt87K9hUZxcwACJBXpqi924tZzLL/De0oy1rWowFjvDOt0QJmdxvlrb0XIQ8ZXmUn2; Expires=Mon, 04 Mar 2024 14:28:32 GMT; Path=/, AWSALBCORS=OFknkMe3v6jbDYjuAYckh8dqk9hf8RxUO/vaFLqyrKq6NHU5AyKc/SjlK5yt87K9hUZxcwACJBXpqi924tZzLL/De0oy1rWowFjvDOt0QJmdxvlrb0XIQ8ZXmUn2; Expires=Mon, 04 Mar 2024 14:28:32 GMT; Path=/; SameSite=None; Secure, brw=brwTYg67Vmrv8qz0c; path=/; expires=Wed, 26 Feb 2025 14:28:32 GMT; domain=.airtable.com; samesite=none; secure, brwConsent=opt-out; path=/; expires=Mon, 26 Feb 2024 14:33:32 GMT; domain=.airtable.com; samesite=none; secure",
"strict-transport-security": "max-age=31536000; includeSubDomains; preload",
"vary": "Accept-Encoding",
"x-content-type-options": "nosniff",
"x-frame-options": "DENY"