AnsweredAssumed Answered

Canvas API - Add User Login syntax

Question asked by Claudia Andrade on Jul 9, 2019
Latest reply on Jul 26, 2019 by James Jones

Hello,

 

I am following the documentation for adding a user login to an existing user via the api. I am getting an "Invalid access token" error. Here is a sample API call that I am using:

curl -X POST <url>/api/v1/accounts/1/logins -H 'Authorization: Bearer <token>' -F 'user[id]=1234' -F 'login[unique_id]=johnsmith003' -F 'login[sis_user_id]=johnsmith003' 

However, I know the API token I am using is correct because when I try running any other API call, it works. 

In the example above, I want to add the user login "johnsmith003" to the existing user with user id 1234. Can anyone point out what I am doing wrong?

 

Any help is appreciated! 

Outcomes