Skip to navigation

Request an OpenID device grant code

View as Markdown

Get an OpenID device grant code that can be verified and subsequently used on an /sso_device_grant_verify request.

The device grant flow is designed for devices that have limited input capabilities or no web browser. It works as follows:

  1. Call this endpoint to get a user code and verification URI
  2. Display the user code and verification URI to the user
  3. The user visits the verification URI on another device and enters the code
  4. Call the /sso_device_grant_verify endpoint to check if the user has completed verification

Example

curl -X POST https://your-ocient-instance/v1/sso_device_grant \
-H "Content-Type: application/json" \
-d '{
"database": "retail_analytics"
}'

Request

This endpoint expects an object.
databasestringOptional

Target database name (defaults to system if not specified). This is the database the user will be connected to after completing the device grant flow.

Response

Token exchange successful
statusobjectRead-only
verification_uri_completestringOptional
A complete URI that includes the verification code, which the user can visit directly to complete the authentication.
verification_uristringOptional
The base URI where the user needs to go to enter the code manually.
user_codestringOptional

The code that should be displayed to the user, to be entered at the verification_uri. This is typically a short, easy-to-type code.

Errors

401
Unauthorized Error