I'm new to this dev world and i'm amazed with all the possibilities that canvas has to offer to developers. But, before that, i need to learn how to authenticate my localhost website to use api calls, right?
If i'm not going wrong, i need to work with Oauth login:
<form method="get" action="https://xxx.instructure.com/login/oauth2/auth?client_id=yyy&response_type=code&redirect_uri=https://example.com/oauth_complete">
<input type="submit" value="submit">
So, lets say if i run this locally, inserting my client Id (that i generated on my canvas enviroment, developer key), this get call should work? (know that is not a good way of doing it, but just need to understand if this is a way to do it or not).
I'm receiving this:
If this should work, what can be done to achieve it that i'm missing? (since it's returning this error message).
If this should not work, where i can learn a little bit on how to authenticate a localhost webpage to canvas.
Edit2: Got it working!
Just used this:
<input type="button" name="getToken" value="Get Token" onclick="location.replace('https://<canvas_url>/login/oauth2/auth?client_id=id&response_type=code&redirect_uri=<uri_urL>&state=inv');">
Thanks for your support!
Alexandre "novice" Schneider