Help

Re: Opted out of expiring urls but API still returning an expired url

8941 0
cancel
Showing results for 
Search instead for 
Did you mean: 
SarahSpringload
4 - Data Explorer
4 - Data Explorer

Hi, I recently ran a script to pull updated changes to our airtable into our application and all the urls to attachments changed. I looked it up and saw that this was to make them invalid after 2 hours. We were using them to point to images on our site so this means a big change in our workflow as we will now have to download the images from the API rather than pointing to them in airtable. We wanted to opt out of the change for now and schedule the work closer to Feb. We opted out in settings and I ran the script to pull the data and get the non-expiring urls. They are still showing in the browser as expired. I have re-run the script and the urls don't change. Does anyone know what is going on?

6 Replies 6

It might take a while for the setting to take effect. If you do not get the old style attachment urls by tomorrow, I recommend contacting support directly.

theJett
5 - Automation Enthusiast
5 - Automation Enthusiast

How do you opt out of expired urls?

10 minutes later, never-mind I found it. I managed to get the non-expiring urls but they do not work. Any idea why?

Opting out of expiring urls is only good for a few more weeks. I don't know if it is worthwhile at this late stage.

You state that your non-expiring urls do not work. How are you trying to use the urls, and what actually is happening? Can you explain how you got the urls (csv export, copying a cell value, scripting, automation, etc.)? What is the format of the url, such as the domain name and whether or not there is a filename at the end. Depending on how you got the url, you might have a "viewer" url that requires being logged into Airtable, or you might still have an expiring url.

theJett
5 - Automation Enthusiast
5 - Automation Enthusiast

How are you trying to use the urls,

using airtable's API endpoint url, my API key to fetch data from my base to my wordpress site using wp_safe_remote_get(). 

and what actually is happening? Can you explain how you got the urls (csv export, copying a cell value, scripting, automation, etc.)? What is the format of the url, such as the domain name and whether or not there is a filename at the end.

I receive the data in .json format, which I pass through json_decod() in order to access the values in PHP.  I've included a screen shot of one record. you can see the url format there.

How do i know if i have a "viewer" url?

This format is the old non-expiring ones, when I "re-hit the API" they changed to this: 
I was using the urls to point to an image (basically using airtable to host our websites images), with the new urls, I will have to download the images into my project to be served locally 

Once you access the attachment via the URL, it will only be accessible at that URL for 2 hours.

So if you want access to an image or an attachment for more than 2 hours, you will need to move the image somewhere else.

If you need this process to be automated, you can use Make to automate the process of moving the attachments out of Airtable and into a publicly-accessible cloud drive (such as Google Drive).

There is a small learning curve with Make, which is why I created this basic navigation video to help. I also provide the links to a few other Make training resources there as well.

p.s. If you have a budget for your project and you’d like to hire an expert Airtable consultant to help you with any of this, please feel free to contact me through my website: Airtable consulting — ScottWorld