'Python - Questrade API - Redeeming access token problem

I'm trying to build a python program to retrieve stock market data from Questrade and I'm having some difficulty redeeming an 'access token'.

My understanding was that we can simply append the token we receive from the 'manual authorization' step to the Questrade URL.

My code is the following:

       import requests
       ...
       QT_URL = 'https://login.questrade.com/oauth2/token?grant_type=refresh_token&refresh_token='
       RetValue = '123456789'
       ...
       Results = requests.get(QT_URL+RetValue) 
       print(Results)

My results are:

       <Response [400]>

Thanks.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source