Hello,
I am new to the Canvas LMS and API. I am testing an API endpoint to enroll students into a section.
/api/v1/sections/:section_id/enrollments
When I insert the required data for enrollment[user_id] and enrollment[type] and call the endpoint, I get this error:
"message": "enrollment[self_enrollment_code] is invalid, enrollment[user_id] must be 'self' when self-enrolling"
This message leads me to believe there's an issue with the account's permissions. I'm using a Canvas local account as the service account for this process. The account has the Account Admin role which seems to have all permissions. Under Account Roles I see the Account Admin role has access to Users- Students and can add and remove students. It also has access to Users- manage students in courses.
Any assistance/guidance would be appreciated, I feel like I'm missing something obvious..
Thanks,
Bobby