Cloud Administration Retrieve Device Registration Code API
3 days ago

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.

For information about managing access to this API, see Accessing the Cloud Administration APIs.

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 .

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.

MethodRequest URLResponse Content TypeResponse BodyResponse Codes
POST/AdminInterface/restapi/v1/users/deviceRegistrationCode
application/jsonUser device registration code200, 400, 403, 429, 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",
    "appId": "1f00c62b-a5c0-49d3-9ffb-92314d717187"
}
{
"username": "usersusername",
"appId": "1f00c62b-a5c0-49d3-9ffb-92314d717187"
}
App TypeappId
RSA Authenticator app for iOS and Android1f00c62b-a5c0-49d3-9ffb-92314d717187
RSA Authenticator app for WindowsN/A
RSA Authenticator app for macOSN/A

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"
}

 

Response Property Descriptions

The following table describes the properties included in the API response.

PropertyDescriptionData Type
email User's email addressString
usernameUser nameString
companyIdCompany identifier String
deviceRegistrationCode Numeric registration code Number
expirationDateDate when the registration code expires. The code for one-time use. See https://www.w3.org/TR/NOTE-datetime for format information. String
timestampTime of response.Number
status HTTP status code (numeric) sent when generate device registration code is unsuccessful.Number
errorHTTP status code (string) sent when generate device registration code is unsuccessful.String
messageReason for failure to generate the device registration code. String

 

Response Codes

The following table shows the response codes for this API and their descriptions.

CodeDescription
200Successfully 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 SecurID multifactor authentication methods.

  • User <email> not found.

  • User is disabled.

  • User already has a device registered.

429Too many requests.
500 Cloud Access Service has an internal error and cannot generate the device registration code.