Any help/hints would be appreciated...I guess I'm unclear on exactly how the ReadAuthorizationStatus endpoint works. The guidance document instructs to use GET and to include the access_token in the authorization. I'm having the same problem as unclek, but I'm not clear on what it could be.
please verify that access_token you received and sent are the same. Some people had problem with SQL cutting it or similar. Can you provide capture of you packet when you receive token and then send token for authorization request?
yshteinm, I haven't quite figured it out yet. I don't save the token anywhere, instead I immediately drop it into the ReadAuthorizationStatus authorization header.... So, I can't blame it on SQL... If I figure it out I will definitely post.
When I tossed the access_token in (without encoding it), it was throwing an error, but if I cast it first [ (String)$access_token ]
it worked fine.
I've actually got most of the Green Button API working (I can get and parse data off of the UsagePoint endpoint). I'm building something off of PHP's Codeigniter framework and an existing OAuth 2.0 library. I've dumped it on github ( github.com/bianca/ontariogreenbuttonincodeigniter/ ) as an open project if anyone wants to use it or keep developing it with me. Let me know!
Can you post full Uri request captured in http level? It is not clear how you request lloks from provided. For example what is request.args['code']
Also I am not sure where "&" is added between parameters
params are wrapped in urlib.urlencode but they look like this:
so there are 2 problems:
1. certificate - Test lab uses self-signed certificates so you might have problem with SSL. Depending on platform you are using you might need some workaround. But that seems strange if the first request (you published earlier) returns 200. But if you changed the library that might happen, some libraries accept such certs.
2. I noticed that you put grant_type and other parameters into "body". They should be part of uri.