Invites an existing external user to join an enterprise.
The existing user can not be part of another enterprise and must already have a Box account. Once invited, the user will receive an email and are prompted to accept the invitation within the Box web application.
This method requires the "Manage An Enterprise" scope enabled for the application, which can be enabled within the developer console.
id,type,name
A comma-separated list of attributes to include in the response. This can be used to request fields that are not normally returned in a standard response.
Be aware that specifying this parameter will have the effect that none of the standard fields are returned in the response unless explicitly specified, instead only fields for the mini representation are returned, additional to the fields requested.
The user to invite
john@example.com
The login of the invited user
The enterprise to invite the user to
1232234
The ID of the enterprise
Returns a new invite object.
An unexpected client error.
curl -X POST https://api.box.com/2.0/invites \
-H 'Authorization: Bearer <ACCESS_TOKEN>'
-H 'Content-Type: application/json" '
-d '{
"enterprise": {
"id": "1232234"
},
"actionable_by": {
"login" : "freeuser@box.com"
}
}'
BoxUser user = new BoxUser(api, "0");
user.invite("Enterprise ID", "Invited User Login");
enterprise = client.get_current_enterprise()
invitation = enterprise.invite_user('user@example.com')
client.enterprise.inviteUser('1345', 'jsmith@box.com', callback);
client.users.inviteToJoinEnterprise(
login: "user@example.com",
enterpriseId: "12345"
) { (result: Result<Invite, BoxSDKError>) in
guard case let .success(invite) = result else {
print("Error inviting user to enterprise")
return
}
print("Invited user \(invite.actionableBy.name) to \(invite.invitedTo.name)")
}