Step 1: Create a worker application
POST {{apiPath}}/environments/{{envID}}/applications
You can use the POST /environments/{{envID}}/applications
endpoint to create the new worker application. For an interactive worker application, the following properties must be set:
- The application's
type
property is set toWORKER
. - The application's
protocol
property is set toOPENID_CONNECT
. - The application's
grantTypes
property array is set toCLIENT_CREDENTIALS
, andAUTHORIZATION_CODE
. - The application's
responseTypes
property array is set toCODE
. - The application's
tokenEndpointAuthMethod
property is set toCLIENT_SECRET_BASIC
, which specifies that theclientID/clientSecret
is used to authentication the token request.
Note: The grantTypes
property also supports the IMPLICIT
type for interactive worker applications. If the IMPLICIT
grant type is specified, the responseTypes
property must include either the TOKEN
or ID_TOKEN
or both values.
The response data returns information about the new application, including its id
property, which identifies the UUID for this application resource. The application's ID is needed in Step 3 to get the role assignments, Step 12 to make the authorization request, and in Step 16 for the token request.
Request Body
{"enabled"=>true, "name"=>"InteractiveWorkerApp_{{$timestamp}}", "description"=>"Test Description - Interactive Worker App", "type"=>"WORKER", "protocol"=>"OPENID_CONNECT", "homePageUrl"=>"https://example.com/homePage", "loginPageUrl"=>"https://example.com/loginPage", "grantTypes"=>["CLIENT_CREDENTIALS", "AUTHORIZATION_CODE"], "postLogoutRedirectUris"=>["https://example.com/logout"], "redirectUris"=>["https://example.com"], "responseTypes"=>["CODE"], "tokenEndpointAuthMethod"=>"CLIENT_SECRET_BASIC", "pkceEnforcement"=>"OPTIONAL", "refreshTokenDuration"=>86400, "refreshTokenRollingDuration"=>86400}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Authorization | string | ||
Content-Type | string |