Skip to main content

Getting refresh token

  • Jun 16, 2024 8:01 PM UTC
  • 2 replies
  • 536 views

Forum|alt.badge.img+2

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?

 

This topic has been closed for replies.

2 replies

j-hugg-ins
Forum|alt.badge.img+9
  • Participating Frequently
  • Jun 16, 2024 9:57 PM UTC

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


Forum|alt.badge.img+2
  • Author
  • New Participant
  • Jun 19, 2024 12:08 PM UTC

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


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: