Unable to exchange code for tokens

(Mac) #1

As outlined in the v2 api here, https://docsv2.dwolla.com/#finish-user-authorization, I’ve been unable to finish authorization process in my python app. After contructing a url, I’m able to retrieve the code in my callback url, but when I submit the code for verifcation I get a 200 response with the following error:
{“error”:“access_denied”,“error_description”:“Invalid application credentials.”}’

I’m using the python requests module as follows:
“client_id”: “812-123-5128”,
“client_secret”: “R5SxRFo9jzD7RflrdlHc9KXH790v0Jkd8QIX3utuvcZRgOMkOa”,
“code”: “8HqdIM3aWGiM5fKW0iEUvnYeJlrP”,
“grant_type”: “authorization_code”,
“redirect_uri”: “https://localhost:8000/polls/redirect
headers={‘Authorization’: ‘Bearer pLhLWet9AyuRgghBeU0cyHB3nfGEJFoGqyiddsIhYxF7eZ3hTT’, ‘Content-Type’: ‘application/vnd.dwolla.v1.hal+json’, ‘Accept’: ‘application/vnd.dwolla.v1.hal+json’}

get_tokens=requests.post(url=url, params=par, headers=headers)

(Spencer Hunter) #2

@mmack3540, See my reply to this question in the thread below…