REST API calls from Google App Engine

(Afzal Farooqui) #1

Initially I tried using dwollaswagger but realized it is not going to work on GAE because it uses the request api.

Later I tried dwolla-python api but it seems very limited in functionality.

In the end I tried using urllib2 to send my own REST calls but I am getting “Method Not Allowed”.

Can someone kindly guide me what is the right way to use dwolla API on GAE to exploit all API features?


(Afzal Farooqui) #2

Trying to understand why the following code doesn’t work:

        url = ""
        req = urllib2.Request(url)
        req.add_header('Content-Type', 'application/vnd.dwolla.v1.hal+json')
        req.add_header('Accept', 'application/vnd.dwolla.v1.hal+json')
        req.add_header('Authorization', 'Bearer ' + dwollaswagger.configuration.access_token)
        body = urllib2.urlopen(req)