Create Registration URL

post

/oaa/runtime/totp/registrationurl/v1/

Use this API to generate a TOTP registration URL.

Request

There are no request parameters for this operation.

Supported Media Types
Request Body - application/xml ()
Root Schema : schema
Type: object
Details for creating a TOTP registration URL.
Show Source
Request Body - application/json ()
Root Schema : schema
Type: object
Details for creating a TOTP registration URL.
Show Source
Back to Top

Response

Supported Media Types

201 Response

Registration URL has been created.
Body ()
Root Schema : CreateTotpConfigResponse
Type: object
Details for creating a totp config for a user.
Show Source

400 Response

Bad Request

401 Response

Unauthorized

403 Response

Could not create TOTP config

422 Response

Requested user information not found

500 Response

Internal server error

503 Response

Service Unavailable
Back to Top

Examples

The following example shows a sample request and response for generating a Time-based One Time Password (TOTP) registration URL.

cURL Command to Generate a TOTP Registration URL in JSON Format

curl --location --request POST '<OAAService>/oaa/runtime/totp/registrationurl/v1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--data '{
"userName": "testuser4",
"groupName": "financeapp4",
"deviceName": "JoeSmithDevice3"
}'

Sample Response in JSON Format

configUrl": "oraclemobileauthenticator://settings?ServiceName::=JoeSmithDevice3&ServiceType::=SharedSecret&SharedSecretAuthServerType::=HTTPBasicAuthentication&LoginURL::=https://oaa.example.com:12345/oaa/rui/totpPreferences/v1?contextInfo=dGVzdHVzZXI0OmZpbmFuY2VhcHA0OjJjYmM5ZDczLWIyZDItNGI0ZC05YjZkLTkxNjFiMDkwYjg3NjpSYW5qYW5EZXZpY2Uz",
"deviceName": "JoeSmithDevice3",
"pin": "NTUzNDgy",
"expiryTimeInMs": 1696327720855
}

cURL Command to Generate a TOTP Registration URL in XML Format

curl --location --request POST '<OAAService>/oaa/runtime/totp/registrationurl/v1' \
--header 'Content-Type: application/xml' \
--header 'Accept: application/xml' \
--header 'Authorization: Basic <Base64Encoded(<username>:<password>)>' \
--data '<?xml version="1.0" encoding="UTF-8" ?>
<CreateTotpConfigRequest>
	<userName>testuser4</userName>
	<groupName>financeapp4</groupName>
	<deviceName>JoeSmithDevice3</deviceName>
</CreateTotpConfigRequest>'

Sample Response in XML Format

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<CreateTotpConfigResponse>
	<configUrl>oraclemobileauthenticator://settings?ServiceName::=JoeSmithDevice3&ServiceType::=SharedSecret&SharedSecretAuthServerType::=HTTPBasicAuthentication&LoginURL::=https://oaa.example.com:12345/oaa/rui/totpPreferences/v1?contextInfo=dGVzdHVzZXI0OmZpbmFuY2VhcHA0OmY2ODI5N2M2LTY4ZDgtNDU5OC05NDc1LTAxNWRmZWExNTM2MzpSYW5qYW5EZXZpY2Uz</configUrl>
	<deviceName>JoeSmithDevice3</deviceName>
	<pin>ODE4ODM2</pin>
	<expiryTimeInMs>1696328061642</expiryTimeInMs>
</CreateTotpConfigResponse>
Back to Top