Welcome to the new Box Support website. Check out all the details here on what’s changed.

How to create a group for app users?

New post

Comments

2 comments

  • liyuan0411

    Correct my problem:

        I have an application and Create 25 APP users by the application token. Now I need create a group for 25 app users. But It seems the application cannot create the groups for the app users.

    0
    Comment actions Permalink
  • Murtza

     I tested adding App Users to a group, and it worked as expected. Below are the steps and cURL commands I used. 

     

    1. Create a new group using the Create Group endpoint.

     

    curl https://api.box.com/2.0/groups \
    -H "Authorization: Bearer ACCESS_TOKEN" \
    -d '{"name": "App Users Test Group"}' \
    -X POST 

     

    2. Add App User to a group using the Create Membership endpoint

     

    curl https://api.box.com/2.0/group_memberships \
    -H "Authorization: Bearer ACCESS_TOKEN" \
    -d '{ "user": { "id": "APP_USER_ID"}, "group": { "id": "GROUP_ID" } }' \
    -X POST

     

    3. Get group members using the Get Membership for Group endpoint.

    curl https://api.box.com/2.0/groups/GROUP_ID/memberships \
    -H "Authorization: Bearer ACCESS_TOKEN"

     

    Can you please share the error message the API returns when you try to add App Users to a group? Can you also please confirm if you have enabled the Manage Groups application scope?

    0
    Comment actions Permalink

Please sign in to leave a comment.