Simple oauth harness - unable to obtain final access token
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I have built a very simple OAUTH connection to a canvas instance, but I'm not getting the expected response. Can someone spot where I have gone wrong?
Thanks
A) Start at: http://nick.lms.cm-hosting.com/canvas/login.php
B) The Oauth initial handshake works, and returns (as specified) back to http://nick.lms.cm-hosting.com/canvas/return.php
C) The PHP $_GET array looks like:
Array ( [code] => 846684a9818d06bf19b639f2f19f5bdbb50188e1440c9e897b7d3abb7250fede81043025b34b3c57a738c5ee111bc52b7f6d3c03a1f502b15b7b7911bc25afb6 [state] => CHECK_THIS ) D) A curl POST is then made to this URL:
https://oup.instructure.com/login/oauth2/token?
code=846684a9818d06bf19b639f2f19f5bdbb50188e1440c9e897b7d3abb7250fede81043025b34b3c57a738c5ee111bc52b7f6d3c03a1f502b15b7b7911bc25afb6
&grant_type=authorization_code
&client_id=130650000000000007
&redirect_uri=http://nick.lms.cm-hosting.com/canvas/return.php&client_secret=ABCDEF (not the real secret)
E) The response returned is: � ]�KO�0 ����� �2 ,IPQ�ix�� �@�JyX^�L��n�ąws��s�{� �<'��M}C:� �;������* � 9 ȏ ���E��K?@��m i���1Am ���w2����!��� �� 0��@ �%� �����s ��aZ �p� B�ט wф�B �@��3f�&� ���2* )K�Ot! �s�6�2�4�I��X���t(�� �s�� �E�����,]�$�V� ����� u� �8�m� �>�_�0�>��*rF �t�� `�|�>
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, yes, it was the zip encoding. The simple exemplar I was using was wrong.