メインコンテンツへスキップ
POST
https://{tenantDomain}/api/v2
/
roles
/
{id}
/
users
Go
package example

import (
    client "github.com/auth0/go-auth0/management/client"
    option "github.com/auth0/go-auth0/management/option"
    context "context"
    roles "github.com/auth0/go-auth0/management/roles"
)

func do() () {
    client := client.NewClient(
        option.WithToken(
            "<token>",
        ),
    )
    client.Roles.Users.Assign(
        context.TODO(),
        "id",
        &roles.AssignRoleUsersRequestContent{
            Users: []string{
                "users",
            },
        },
    )
}

承認

Authorization
string
header
必須

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

パスパラメータ

id
string
必須

ID of the role to assign users to.

ボディ

users
string<user-id-with-max-length>[]
必須

user_id's of the users to assign the role to.

レスポンス

Role users successfully updated.