Device Authorization Grant

Device authorization request

Initiates a device authorization workflow, generating and returning a unique device verification code.
See https://www.rfc-editor.org/rfc/rfc8628#section-3.1 for details.

post
https://global.api.konghq.com/v3/internal/oauth/device/authorize

Body

application/x-www-form-urlencoded

The request schema for the device authorization request.

client_idstringrequired

The client identifier.

scopestring

The scope of the access request.

Response

application/json

Device authorization response

Device Authorization Response

device_codestringrequired

The device verification code.

user_codestringrequired

The end-user verification code.

verification_uristringrequired

The end-user verification URI on the authorization server.

verification_uri_completestring

A verification URI that includes the “user_code”.

expires_inintegerrequired

The lifetime in seconds of the “device_code” and “user_code”.

intervalinteger

The minimum amount of time in seconds that the client should wait between polling requests to the token endpoint.

post/internal/oauth/device/authorize

Body

{ "client_id": "client_id" }
 
application/json

Device access token request

This endpoint provides the machine client a means of being notified when a request for authorization is granted or rejected.
It is expected for the client to try the access token request repeatedly in a polling fashion based on the error code in the response.
See https://www.rfc-editor.org/rfc/rfc8628#section-3.4 for details.

post
https://global.api.konghq.com/v3/internal/oauth/device/token

Body

application/x-www-form-urlencoded

The request schema for the device access token request.

grant_typestringrequired

Value MUST be set to “urn:ietf:params:oauth:grant-type:device_code”.

device_codestringrequired

The device verification code, “device_code” from the device authorization response.

client_idstringrequired

The client identifier.

Response

application/json

Device access token response

Device Access Token Response

access_tokenstringrequired

The access token issued by the authorization server.

token_typestringrequired

The type of the token issued.

expires_inintegerrequired

The lifetime in seconds of the access token.

refresh_tokenstring

The refresh token, which can be used to obtain new access tokens using the same authorization grant.

scopestring

The scope of the access token.

post/internal/oauth/device/token

Body

{ "grant_type": "grant_type", "device_code": "device_code", "client_id": "client_id" }
 
application/json

User device authorization request

Marks the device code as authorized and is a means to provide the interactive UI flow with the necessary request metadata for the user to confirm the request.

post
https://global.api.konghq.com/v3/internal/oauth/device/authorize/user

Body

application/json

The request schema for the user device authorization request.

user_codestringrequired

The end-user device verification code.

Response

application/json

User device authorization response

User Device Authorization Response

organization_namestringrequired

The name of the organization.

userobjectrequired

The user object contains information about an individual user who can use the Konnect application and API.

Example:{"id":"7f9fd312-a987-4628-b4c5-bb4f4fddd5f7","email":"user@email.com","full_name":"Test User","preferred_name":"test","active":true,"inferred_region":"us","created_at":"2022-02-07T17:46:57.52Z","updated_at":"2022-10-08T17:00:00.52Z"}

Show Child Parameters
metadataobjectrequired

The device metadata to be displayed to the user for confirmation.

Example:{"client_name":"Konnect CLI","user_agent":"kconnectctl/0.12","source_ip":"192.158.1.38","requested_at":"2022-02-07T17:46:57.52Z"}

Show Child Parameters
post/internal/oauth/device/authorize/user

Body

{ "user_code": "user_code" }
 
application/json

Device confirmation request

Confirms the authorization request by marking the device code as confirmed.

patch
https://global.api.konghq.com/v3/internal/oauth/device/confirm

Body

application/json

The request schema for the device confirmation request.

user_codestringrequired

The end-user device verification code.

Response

No Content

patch/internal/oauth/device/confirm

Body

{ "user_code": "user_code" }