# How to call refresh token with omniauth-infusionsoft in Ruby?

**URL:** https://integration.keap.com/t/how-to-call-refresh-token-with-omniauth-infusionsoft-in-ruby/62011
**Category:** API Q&A
**Tags:** oauth
**Created:** [January 22, 2019, 12:49pm UTC](https://integration.keap.com/t/how-to-call-refresh-token-with-omniauth-infusionsoft-in-ruby/62011 "2019-01-22T12:49:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![lynnchin](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/lynnchin/32/9908_2.png) [@lynnchin](https://integration.keap.com/u/lynnchin)
#### Post date: [January 22, 2019, 12:49pm UTC](https://integration.keap.com/t/how-to-call-refresh-token-with-omniauth-infusionsoft-in-ruby/62011/1 "2019-01-22T12:49:23Z")

</div>

Hello,

I am now able to retrieve the access token from Infusionsoft API using OAuth 2.0 with the omniauth-infusionsoft gem. However, I am now stuck on handle the refresh token since there isn’t much example available on the web. Can someone provide some hints or advice on how this can be done in ruby?

---

<div class="post-metadata">

### Author: ![John\_Borelli](https://sea1.discourse-cdn.com/flex019/user_avatar/integration.keap.com/john_borelli/32/11880_2.png) [@John\_Borelli](https://integration.keap.com/u/John_Borelli)
#### Post date: [January 26, 2019, 9:41am UTC](https://integration.keap.com/t/how-to-call-refresh-token-with-omniauth-infusionsoft-in-ruby/62011/2 "2019-01-26T09:41:21Z")

</div>

This vid I have covers the topics in PHP but the concepts are still the same and I go over managing refresh cycles for the tokens.

[![](https://us1.discourse-cdn.com/flex019/uploads/infusionsoft1/original/2X/6/636d9b0c40071bb3385c3bbf0995d6c5fd9b1be5.jpeg "Using OAuth2 and Infusionsoft API/REST") ](https://www.youtube.com/watch?v=zjS8tCmnkBs)
