API Error for Retrieve User and List Users

I am receiving an error when attempting to make any User calls from the API. Specifically, the "Retrieve a user" and "List Users" give me the error message:
{"error":"insufficient_scope","error_description":"Insufficient scope for this resource","scope":"user"}

 

Here are the two end points I have tried:

https://api.domo.com/v1/users/1
<Response [403]>
{"error":"insufficient_scope","error_description":"Insufficient scope for this resource","scope":"user"}

 

https://api.domo.com/v1/users?limit=10
<Response [403]>
{"error":"insufficient_scope","error_description":"Insufficient scope for this resource","scope":"user"}

Comments

  • Try creating a client and allow it to have a scope with all the permissions and see if you get the same issue. If you do something else is wrong, if you don't than you need to grant an additional scope than you realize you need to. First thing that jumps out is if you're trying to GET user DATA you probably need to add the "Data" scope to that client.



    **Make sure to like any users posts that helped you and accept the ones who solved your issue.**
  • Thanks for the response!  So if i understand this correctly, the function of this API endpoint is not as simple as pulling any DOMO users profile 'out of box', without having to set them up a specific way?  We have 100+ users right now in our Domo environment, and i was looking for a way to pull any one of these 100+ users' profiles via the API.  Thank you!

  • You should be able to retrieve information about the user as documented here https://developer.domo.com/docs/users-api-reference/users-2#Retrieve%20a%20user I just mean that the scope of 'user' might be enough permissions to create a user but not retrieve information about a user. Didn't know that for a fact which is why I suggested added all permissions to the Client you're using in your code, and if it then works I'd bet it's the 'data' scope that made it work. 

     

    Try the following:

    1: Go to https://developer.domo.com/

    2: In upper right go My Account->New Client

    3: Create a new client will all scopes

    4: Replace the credentials in your script to the new client credentials and try again

    5: If it works try creating a client with only the User and Data scopes and see if that works.

    6: If none of the above works I'll try to see if I'm able to get it and help



    **Make sure to like any users posts that helped you and accept the ones who solved your issue.**
  • FYI I did do a quick test in the API Explorer https://developer.domo.com/explorer#!/auth and you can do one for list users, it worked when I did a scope of Users and Data



    **Make sure to like any users posts that helped you and accept the ones who solved your issue.**
This discussion has been closed.