Auto Enrollment API

Hi,
I am trying to test open edx’s auto enrollment api and I am new to API. I get a successful 200 OK status, but it takes me to a sign in or Register page. I can make a successful GET request to the following endpoint:

/account/finish_auth?course_id=coursev1%3AedX%2BDemoX%2BDemo_Course&enrollment_action=enroll

I want to know which authentication method will be used and which result will be?
If one of authentication method is used, how can i get access token of each user?
I am using the following command " * curl -X POST -d “client_id=INSERT_CLIENT_ID&grant_type=password&username=INSERT_USERNAME&password=INSERT_PASSWORD” http://localhost:8000/oauth2/access_token/" to get access token but is not ok.

I am sorry for my silly question. Please explain me …

Hey @HlaThit

I thinks this is a duplicate of this. Having said that you can see the API docs at http://localhost:18000/api-docs/ for the development environment or <your_instance_url>/api-docs. You can search for “enrollment” which will give you something like this:

This is a swagger UI so you can as well interact with it and see if you can achieve what you set out for. :slight_smile:

Let me know if this helped you or you have any follow up.

1 Like