edx api authentication

66 views
Skip to first unread message

sarath cp

unread,
Oct 12, 2015, 5:33:24 AM10/12/15
to General Open edX discussion
hi all,
   i am working on edx for integrating api. currently i got some default api-ulrs, that is provided by edx. but i cant do user login through edx api call. how can i authenticate a user, to enroll to a course using edx api.

Lee Ching Kit

unread,
Oct 13, 2016, 7:57:03 AM10/13/16
to General Open edX discussion
hi sarath,
i have the same problem
have u fix it?
if yes can u teach me how to do it?

sarath cp於 2015年10月12日星期一 UTC+8下午5時33分24秒寫道:

ant...@proversity.org

unread,
Oct 14, 2016, 8:17:02 AM10/14/16
to General Open edX discussion
Sarath and Lee Ching

BASE_URL + /oauth2/access_token

make a post request, username can be the username or email
make the payload as a form (eg. FormData in Javascript) with this values:
var data = new FormData() data.append('grant_type', 'password') data.append('client_id', config.CLIENT_ID) data.append('username', email) data.append('password', password) Happy coding!


Reply all
Reply to author
Forward
0 new messages