Cloud Administration Retrieve Device Registration Code API

Use the Cloud Administration Retrieve Device Registration Code API to generate a code so that users can register their iOS, Android, and Windows devices.

Authentication

Clients calling this API must authenticate themselves by including a JSON Web Token in a request. For instructions on using this token, see Authentication for the Cloud Administration APIs .

Administrative Roles

This API can use an API Key that is associated with either the Super Admin or Help Desk Administrator role. For more information, see Manage the Cloud Administration API Keys.

Software Developer Kit

You can download the API Software Developer Kit (SDK) from Cloud Administration REST API Download.

Request Requirements

Use the following information to generate a device registration code.

Method Request URL Response Content Type Response Body Response Codes
POST /AdminInterface/restapi/v1/users/deviceRegistrationCode
application/json User device registration code 200, 400, 403, 500

Example Request Data

The request does not contain any parameters. The following example displays a request.

POST /AdminInterface/restapi/v1/users/deviceRegistrationCode

Accept: application/json

Authorization: Bearer <JWT token>

Example Request Body

{

"email": "user.one@mycompany.com"

{

Example Response

The following example response shows a device registration code for a user.

{

"companyID": "MyCompany",

"deviceRegistrationCode": "110690571",

"email": "user.one@mycompany.com",

"expirationDate": "2020-01-10T19:10:30.045Z"

}

The following example response is used when the user already has a registered device.

{

"timestamp": 1578675038636,

"status": 403

"error": "Forbidden";

"message": "User already has a registered device.",

"path": "/AdminInterface/restapi/v1/users/deviceRegistrationCode"

}

Property Response Descriptions

Property Description Data Type
email User's email address String
companyId Company identifier String
deviceRegistrationCode Numeric registration code Number
expirationDate Date when the registration code expires. The code for one-time use. See https://www.w3.org/TR/NOTE-datetime for format information. String
timestamp Time of response. Number
status HTTP status code (numeric) sent when generate device registration code is unsuccessful. Number
error HTTP status code (string) sent when generate device registration code is unsuccessful. String
message Reason for failure to generate the device registration code. String

Response Codes

Code Description
200 Successfully generated a device registration code.
400

Error caused by one of the following:

  • Incorrect number of properties in the request body.

  • Invalid property specified: emailId

403

Device registration code not generated for one of the following reasons:

  • Your company is not licensed to use RSA SecurID Access multifactor authentication methods.

  • User <email> not found.

  • User is disabled.

  • User already has a device registered.

500 The Cloud Authentication Service has an internal error and cannot generate the device registration code.