"Invalid grant type." Error

Hey Dwolla folks,

I am getting notifications about an “Invalid grant type.” error when we try and refresh the token for our account. Using the Dwolla wrapper libraries the offending line is

new_token = $dwolla.auths.refresh $dwolla.tokens.new(:access_token => corp_acct.dwolla_token, :refresh_token => corp_acct.dwolla_refresh_token)

This only started breaking 1-2 days ago and this is a legacy operation we haven’t touched in well over a year, was there a breaking change we missed or is there a known short term issue? Thanks for your help!

Eric

Hi @mayefsky, Apologies for the miscommunication, the refresh token flow was sunset within the last few week which is likely why you are running into the invalid grant type error. The updated auth flow is outlined the docs here which is what you’ll want to switch to moving forward. Instead of obtaining an OAuth access token and refresh token pair via the 3-legged OAuth flow, you now have the ability to programmatically fetch an access token using the client credentials grant type (2-legged flow). Please let us know if you have any questions about the updated auth flow for obtaining an access token and we would be happy to provide additional information and assistance.

Thanks for the quick reply–this was an easy fix which is great since we’re not actively working on it. Thanks again!

1 Like