Jun 16, 2024 01:01 PM
I am trying to connect with other application that asks me for my client_id, client_secret, api_token, and refresh_token.
So far I have set my api_token, client_id and client_secret, but still struggling with creating the refresh_token. Where should I find it?
Jun 16, 2024 02:57 PM
Hi Felix. When you make an authorised OAuth request to Airtable’s token endpoint using your credentials a successful response will normally include a refresh token. It’s not something static like the credentials in your screenshot as they are generated dynamically. For security reasons access tokens expire after 60 minutes at which point you use the refresh token to request a new one.
You can read more about it in the Airtable API docs here - https://airtable.com/developers/web/api/oauth-reference#token-expiry-refresh-tokens
Jun 19, 2024 05:08 AM
Hi @j-hugg-ins thanks for your quick response, I finally came up with a solution for getting the refresh_token that maybe could be useful for other users, it is written in Node.js, you need to previously set your Oauth app in Airtable and clone the repo, it will ask you to set your client_id and client_secret, the rest is carefully following the instructions:
After running the server will respond with the information you're looking for: