Chilkat Online Tools

DataFlex / ForgeRock Identity Cloud Collection / Step 3: Create Administrative OAuth 2.0 Client

Back to Collection Items

Use ChilkatAx-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Handle hoJson
    Variant vSbRequestBody
    Handle hoSbRequestBody
    Variant vResp
    Handle hoResp
    String sTemp1
    Integer iTemp1
    Boolean bTemp1

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    // Use this online tool to generate code from sample JSON: Generate Code to Create JSON

    // The following JSON is sent in the request body.

    // {
    //   "coreOAuth2ClientConfig": {
    //     "agentgroup": "",
    //     "status": {
    //       "inherited": false,
    //       "value": "Active"
    //     },
    //     "userpassword": "{{postmanClientSecret}}",
    //     "clientType": {
    //       "inherited": false,
    //       "value": "Confidential"
    //     },
    //     "loopbackInterfaceRedirection": {
    //       "inherited": true,
    //       "value": true
    //     },
    //     "redirectionUris": {
    //       "inherited": false,
    //       "value": [
    //         "https://httpbin.org/anything"
    //       ]
    //     },
    //     "scopes": {
    //       "inherited": false,
    //       "value": [
    //         "fr:idm:*"
    //       ]
    //     },
    //     "defaultScopes": {
    //       "inherited": true,
    //       "value": [
    //         "Unknown Type: any"
    //       ]
    //     },
    //     "clientName": {
    //       "inherited": true,
    //       "value": [
    //         "Unknown Type: any"
    //       ]
    //     },
    //     "authorizationCodeLifetime": {
    //       "inherited": true,
    //       "value": 0
    //     },
    //     "refreshTokenLifetime": {
    //       "inherited": true,
    //       "value": 0
    //     },
    //     "accessTokenLifetime": {
    //       "inherited": true,
    //       "value": 0
    //     }
    //   },
    //   "advancedOAuth2ClientConfig": {
    //     "name": {
    //       "inherited": true,
    //       "value": [
    //         "Unknown Type: any"
    //       ]
    //     },
    //     "descriptions": {
    //       "inherited": true,
    //       "value": [
    //         "Unknown Type: any"
    //       ]
    //     },
    //     "requestUris": {
    //       "inherited": true,
    //       "value": [
    //         "Unknown Type: any"
    //       ]
    //     },
    //     "responseTypes": {
    //       "inherited": true,
    //       "value": [
    //         "Unknown Type: any"
    //       ]
    //     },
    //     "grantTypes": {
    //       "inherited": false,
    //       "value": [
    //         "password"
    //       ]
    //     },
    //     "contacts": {
    //       "inherited": true,
    //       "value": [
    //         "Unknown Type: any"
    //       ]
    //     },
    //     "tokenEndpointAuthMethod": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "sectorIdentifierUri": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "subjectType": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "updateAccessToken": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "clientUri": {
    //       "inherited": true,
    //       "value": [
    //         "Unknown Type: any"
    //       ]
    //     },
    //     "logoUri": {
    //       "inherited": true,
    //       "value": [
    //         "Unknown Type: any"
    //       ]
    //     },
    //     "policyUri": {
    //       "inherited": true,
    //       "value": [
    //         "Unknown Type: any"
    //       ]
    //     },
    //     "isConsentImplied": {
    //       "inherited": true,
    //       "value": true
    //     },
    //     "mixUpMitigation": {
    //       "inherited": true,
    //       "value": true
    //     }
    //   },
    //   "coreOpenIDClientConfig": {
    //     "claims": {
    //       "inherited": true,
    //       "value": [
    //         "Unknown Type: any"
    //       ]
    //     },
    //     "postLogoutRedirectUri": {
    //       "inherited": true,
    //       "value": [
    //         "Unknown Type: any"
    //       ]
    //     },
    //     "clientSessionUri": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "defaultMaxAge": {
    //       "inherited": true,
    //       "value": 0
    //     },
    //     "defaultMaxAgeEnabled": {
    //       "inherited": true,
    //       "value": true
    //     },
    //     "defaultAcrValues": {
    //       "inherited": true,
    //       "value": [
    //         "Unknown Type: any"
    //       ]
    //     },
    //     "jwtTokenLifetime": {
    //       "inherited": true,
    //       "value": 0
    //     }
    //   },
    //   "signEncOAuth2ClientConfig": {
    //     "jwksUri": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "jwksCacheTimeout": {
    //       "inherited": true,
    //       "value": 0
    //     },
    //     "jwkStoreCacheMissCacheTime": {
    //       "inherited": true,
    //       "value": 0
    //     },
    //     "tokenEndpointAuthSigningAlgorithm": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "jwkSet": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "idTokenSignedResponseAlg": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "idTokenEncryptionEnabled": {
    //       "inherited": true,
    //       "value": true
    //     },
    //     "idTokenEncryptionAlgorithm": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "idTokenEncryptionMethod": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "idTokenPublicEncryptionKey": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "clientJwtPublicKey": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "mTLSTrustedCert": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "mTLSSubjectDN": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "mTLSCertificateBoundAccessTokens": {
    //       "inherited": true,
    //       "value": true
    //     },
    //     "publicKeyLocation": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "userinfoResponseFormat": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "userinfoSignedResponseAlg": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "userinfoEncryptedResponseAlg": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "userinfoEncryptedResponseEncryptionAlgorithm": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "requestParameterSignedAlg": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "requestParameterEncryptedAlg": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "requestParameterEncryptedEncryptionAlgorithm": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "tokenIntrospectionResponseFormat": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "tokenIntrospectionSignedResponseAlg": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "tokenIntrospectionEncryptedResponseAlg": {
    //       "inherited": true,
    //       "value": "string"
    //     },
    //     "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": {
    //       "inherited": true,
    //       "value": "string"
    //     }
    //   },
    //   "coreUmaClientConfig": {
    //     "claimsRedirectionUris": {
    //       "inherited": true,
    //       "value": [
    //         "Unknown Type: any"
    //       ]
    //     }
    //   }
    // }

    Get Create (RefClass(cComChilkatJsonObject)) To hoJson
    If (Not(IsComObjectCreated(hoJson))) Begin
        Send CreateComObject of hoJson
    End
    Get ComUpdateString Of hoJson "coreOAuth2ClientConfig.agentgroup" "" To iSuccess
    Get ComUpdateBool Of hoJson "coreOAuth2ClientConfig.status.inherited" False To iSuccess
    Get ComUpdateString Of hoJson "coreOAuth2ClientConfig.status.value" "Active" To iSuccess
    Get ComUpdateString Of hoJson "coreOAuth2ClientConfig.userpassword" "{{postmanClientSecret}}" To iSuccess
    Get ComUpdateBool Of hoJson "coreOAuth2ClientConfig.clientType.inherited" False To iSuccess
    Get ComUpdateString Of hoJson "coreOAuth2ClientConfig.clientType.value" "Confidential" To iSuccess
    Get ComUpdateBool Of hoJson "coreOAuth2ClientConfig.loopbackInterfaceRedirection.inherited" True To iSuccess
    Get ComUpdateBool Of hoJson "coreOAuth2ClientConfig.loopbackInterfaceRedirection.value" True To iSuccess
    Get ComUpdateBool Of hoJson "coreOAuth2ClientConfig.redirectionUris.inherited" False To iSuccess
    Get ComUpdateString Of hoJson "coreOAuth2ClientConfig.redirectionUris.value[0]" "https://httpbin.org/anything" To iSuccess
    Get ComUpdateBool Of hoJson "coreOAuth2ClientConfig.scopes.inherited" False To iSuccess
    Get ComUpdateString Of hoJson "coreOAuth2ClientConfig.scopes.value[0]" "fr:idm:*" To iSuccess
    Get ComUpdateBool Of hoJson "coreOAuth2ClientConfig.defaultScopes.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "coreOAuth2ClientConfig.defaultScopes.value[0]" "Unknown Type: any" To iSuccess
    Get ComUpdateBool Of hoJson "coreOAuth2ClientConfig.clientName.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "coreOAuth2ClientConfig.clientName.value[0]" "Unknown Type: any" To iSuccess
    Get ComUpdateBool Of hoJson "coreOAuth2ClientConfig.authorizationCodeLifetime.inherited" True To iSuccess
    Get ComUpdateInt Of hoJson "coreOAuth2ClientConfig.authorizationCodeLifetime.value" 0 To iSuccess
    Get ComUpdateBool Of hoJson "coreOAuth2ClientConfig.refreshTokenLifetime.inherited" True To iSuccess
    Get ComUpdateInt Of hoJson "coreOAuth2ClientConfig.refreshTokenLifetime.value" 0 To iSuccess
    Get ComUpdateBool Of hoJson "coreOAuth2ClientConfig.accessTokenLifetime.inherited" True To iSuccess
    Get ComUpdateInt Of hoJson "coreOAuth2ClientConfig.accessTokenLifetime.value" 0 To iSuccess
    Get ComUpdateBool Of hoJson "advancedOAuth2ClientConfig.name.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "advancedOAuth2ClientConfig.name.value[0]" "Unknown Type: any" To iSuccess
    Get ComUpdateBool Of hoJson "advancedOAuth2ClientConfig.descriptions.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "advancedOAuth2ClientConfig.descriptions.value[0]" "Unknown Type: any" To iSuccess
    Get ComUpdateBool Of hoJson "advancedOAuth2ClientConfig.requestUris.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "advancedOAuth2ClientConfig.requestUris.value[0]" "Unknown Type: any" To iSuccess
    Get ComUpdateBool Of hoJson "advancedOAuth2ClientConfig.responseTypes.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "advancedOAuth2ClientConfig.responseTypes.value[0]" "Unknown Type: any" To iSuccess
    Get ComUpdateBool Of hoJson "advancedOAuth2ClientConfig.grantTypes.inherited" False To iSuccess
    Get ComUpdateString Of hoJson "advancedOAuth2ClientConfig.grantTypes.value[0]" "password" To iSuccess
    Get ComUpdateBool Of hoJson "advancedOAuth2ClientConfig.contacts.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "advancedOAuth2ClientConfig.contacts.value[0]" "Unknown Type: any" To iSuccess
    Get ComUpdateBool Of hoJson "advancedOAuth2ClientConfig.tokenEndpointAuthMethod.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "advancedOAuth2ClientConfig.tokenEndpointAuthMethod.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "advancedOAuth2ClientConfig.sectorIdentifierUri.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "advancedOAuth2ClientConfig.sectorIdentifierUri.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "advancedOAuth2ClientConfig.subjectType.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "advancedOAuth2ClientConfig.subjectType.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "advancedOAuth2ClientConfig.updateAccessToken.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "advancedOAuth2ClientConfig.updateAccessToken.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "advancedOAuth2ClientConfig.clientUri.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "advancedOAuth2ClientConfig.clientUri.value[0]" "Unknown Type: any" To iSuccess
    Get ComUpdateBool Of hoJson "advancedOAuth2ClientConfig.logoUri.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "advancedOAuth2ClientConfig.logoUri.value[0]" "Unknown Type: any" To iSuccess
    Get ComUpdateBool Of hoJson "advancedOAuth2ClientConfig.policyUri.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "advancedOAuth2ClientConfig.policyUri.value[0]" "Unknown Type: any" To iSuccess
    Get ComUpdateBool Of hoJson "advancedOAuth2ClientConfig.isConsentImplied.inherited" True To iSuccess
    Get ComUpdateBool Of hoJson "advancedOAuth2ClientConfig.isConsentImplied.value" True To iSuccess
    Get ComUpdateBool Of hoJson "advancedOAuth2ClientConfig.mixUpMitigation.inherited" True To iSuccess
    Get ComUpdateBool Of hoJson "advancedOAuth2ClientConfig.mixUpMitigation.value" True To iSuccess
    Get ComUpdateBool Of hoJson "coreOpenIDClientConfig.claims.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "coreOpenIDClientConfig.claims.value[0]" "Unknown Type: any" To iSuccess
    Get ComUpdateBool Of hoJson "coreOpenIDClientConfig.postLogoutRedirectUri.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "coreOpenIDClientConfig.postLogoutRedirectUri.value[0]" "Unknown Type: any" To iSuccess
    Get ComUpdateBool Of hoJson "coreOpenIDClientConfig.clientSessionUri.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "coreOpenIDClientConfig.clientSessionUri.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "coreOpenIDClientConfig.defaultMaxAge.inherited" True To iSuccess
    Get ComUpdateInt Of hoJson "coreOpenIDClientConfig.defaultMaxAge.value" 0 To iSuccess
    Get ComUpdateBool Of hoJson "coreOpenIDClientConfig.defaultMaxAgeEnabled.inherited" True To iSuccess
    Get ComUpdateBool Of hoJson "coreOpenIDClientConfig.defaultMaxAgeEnabled.value" True To iSuccess
    Get ComUpdateBool Of hoJson "coreOpenIDClientConfig.defaultAcrValues.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "coreOpenIDClientConfig.defaultAcrValues.value[0]" "Unknown Type: any" To iSuccess
    Get ComUpdateBool Of hoJson "coreOpenIDClientConfig.jwtTokenLifetime.inherited" True To iSuccess
    Get ComUpdateInt Of hoJson "coreOpenIDClientConfig.jwtTokenLifetime.value" 0 To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.jwksUri.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.jwksUri.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.jwksCacheTimeout.inherited" True To iSuccess
    Get ComUpdateInt Of hoJson "signEncOAuth2ClientConfig.jwksCacheTimeout.value" 0 To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.jwkStoreCacheMissCacheTime.inherited" True To iSuccess
    Get ComUpdateInt Of hoJson "signEncOAuth2ClientConfig.jwkStoreCacheMissCacheTime.value" 0 To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.tokenEndpointAuthSigningAlgorithm.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.tokenEndpointAuthSigningAlgorithm.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.jwkSet.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.jwkSet.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.idTokenSignedResponseAlg.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.idTokenSignedResponseAlg.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.idTokenEncryptionEnabled.inherited" True To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.idTokenEncryptionEnabled.value" True To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.idTokenEncryptionAlgorithm.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.idTokenEncryptionAlgorithm.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.idTokenEncryptionMethod.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.idTokenEncryptionMethod.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.idTokenPublicEncryptionKey.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.idTokenPublicEncryptionKey.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.clientJwtPublicKey.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.clientJwtPublicKey.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.mTLSTrustedCert.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.mTLSTrustedCert.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.mTLSSubjectDN.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.mTLSSubjectDN.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.mTLSCertificateBoundAccessTokens.inherited" True To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.mTLSCertificateBoundAccessTokens.value" True To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.publicKeyLocation.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.publicKeyLocation.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.userinfoResponseFormat.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.userinfoResponseFormat.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.userinfoSignedResponseAlg.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.userinfoSignedResponseAlg.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.userinfoEncryptedResponseAlg.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.userinfoEncryptedResponseAlg.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.userinfoEncryptedResponseEncryptionAlgorithm.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.userinfoEncryptedResponseEncryptionAlgorithm.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.requestParameterSignedAlg.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.requestParameterSignedAlg.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.requestParameterEncryptedAlg.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.requestParameterEncryptedAlg.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.requestParameterEncryptedEncryptionAlgorithm.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.requestParameterEncryptedEncryptionAlgorithm.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.tokenIntrospectionResponseFormat.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.tokenIntrospectionResponseFormat.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.tokenIntrospectionSignedResponseAlg.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.tokenIntrospectionSignedResponseAlg.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.tokenIntrospectionEncryptedResponseAlg.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.tokenIntrospectionEncryptedResponseAlg.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "signEncOAuth2ClientConfig.tokenIntrospectionEncryptedResponseEncryptionAlgorithm.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "signEncOAuth2ClientConfig.tokenIntrospectionEncryptedResponseEncryptionAlgorithm.value" "string" To iSuccess
    Get ComUpdateBool Of hoJson "coreUmaClientConfig.claimsRedirectionUris.inherited" True To iSuccess
    Get ComUpdateString Of hoJson "coreUmaClientConfig.claimsRedirectionUris.value[0]" "Unknown Type: any" To iSuccess

    Send ComSetRequestHeader To hoHttp "accept" "application/json"
    Send ComSetRequestHeader To hoHttp "X-Requested-With" "ForgeRock Identity Cloud Postman Collection"
    Send ComSetRequestHeader To hoHttp "Content-Type" "application/json"
    Send ComSetRequestHeader To hoHttp "{{cookieName}}" "{{adminSSOToken}}"

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSbRequestBody
    If (Not(IsComObjectCreated(hoSbRequestBody))) Begin
        Send CreateComObject of hoSbRequestBody
    End
    Get pvComObject of hoSbRequestBody to vSbRequestBody
    Get ComEmitSb Of hoJson vSbRequestBody To iSuccess

    Get pvComObject of hoSbRequestBody to vSbRequestBody
    Get ComPTextSb Of hoHttp "PUT" "https://<tenant-name>.forgeblocks.com/am/json/realms/root/realms/alpha/realm-config/agents/OAuth2Client/postmanAdminClient" vSbRequestBody "utf-8" "application/json" False False To vResp
    If (IsComObject(vResp)) Begin
        Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
        Set pvComObject Of hoResp To vResp
    End
    Get ComLastMethodSuccess Of hoHttp To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get ComStatusCode Of hoResp To iTemp1
    Showln iTemp1
    Get ComBodyStr Of hoResp To sTemp1
    Showln sTemp1
    Send Destroy of hoResp


End_Procedure

Curl Command

curl -X PUT
	-H "accept: application/json"
	-H "Content-Type: application/json"
	-H "X-Requested-With: ForgeRock Identity Cloud Postman Collection"
	-H "{{cookieName}}: {{adminSSOToken}}"
	-d '{
  "coreOAuth2ClientConfig": {
    "agentgroup": "",
    "status": {
      "inherited": false,
      "value": "Active"
    },
    
    "userpassword": "{{postmanClientSecret}}",
    "clientType": {
      "inherited": false,
      "value": "Confidential"
    },
    "loopbackInterfaceRedirection": {
      "inherited": true,
      "value": true
    },
    "redirectionUris": {
      "inherited": false,
      "value": [
        "https://httpbin.org/anything"
      ]
    },
    "scopes": {
      "inherited": false,
      "value": [
        "fr:idm:*"
      ]
    },
    "defaultScopes": {
      "inherited": true,
      "value": [
        "Unknown Type: any"
      ]
    },
    "clientName": {
      "inherited": true,
      "value": [
        "Unknown Type: any"
      ]
    },
    "authorizationCodeLifetime": {
      "inherited": true,
      "value": 0
    },
    "refreshTokenLifetime": {
      "inherited": true,
      "value": 0
    },
    "accessTokenLifetime": {
      "inherited": true,
      "value": 0
    }
  },
  "advancedOAuth2ClientConfig": {
    "name": {
      "inherited": true,
      "value": [
        "Unknown Type: any"
      ]
    },
    "descriptions": {
      "inherited": true,
      "value": [
        "Unknown Type: any"
      ]
    },
    "requestUris": {
      "inherited": true,
      "value": [
        "Unknown Type: any"
      ]
    },
    "responseTypes": {
      "inherited": true,
      "value": [
        "Unknown Type: any"
      ]
    },
    "grantTypes": {
      "inherited": false,
      "value": [
        "password"
      ]
    },
    "contacts": {
      "inherited": true,
      "value": [
        "Unknown Type: any"
      ]
    },
    "tokenEndpointAuthMethod": {
      "inherited": true,
      "value": "string"
    },
    "sectorIdentifierUri": {
      "inherited": true,
      "value": "string"
    },
    "subjectType": {
      "inherited": true,
      "value": "string"
    },
    "updateAccessToken": {
      "inherited": true,
      "value": "string"
    },
    "clientUri": {
      "inherited": true,
      "value": [
        "Unknown Type: any"
      ]
    },
    "logoUri": {
      "inherited": true,
      "value": [
        "Unknown Type: any"
      ]
    },
    "policyUri": {
      "inherited": true,
      "value": [
        "Unknown Type: any"
      ]
    },
    "isConsentImplied": {
      "inherited": true,
      "value": true
    },
    "mixUpMitigation": {
      "inherited": true,
      "value": true
    }
  },
  "coreOpenIDClientConfig": {
    "claims": {
      "inherited": true,
      "value": [
        "Unknown Type: any"
      ]
    },
    "postLogoutRedirectUri": {
      "inherited": true,
      "value": [
        "Unknown Type: any"
      ]
    },
    "clientSessionUri": {
      "inherited": true,
      "value": "string"
    },
    "defaultMaxAge": {
      "inherited": true,
      "value": 0
    },
    "defaultMaxAgeEnabled": {
      "inherited": true,
      "value": true
    },
    "defaultAcrValues": {
      "inherited": true,
      "value": [
        "Unknown Type: any"
      ]
    },
    "jwtTokenLifetime": {
      "inherited": true,
      "value": 0
    }
  },
  "signEncOAuth2ClientConfig": {
    "jwksUri": {
      "inherited": true,
      "value": "string"
    },
    "jwksCacheTimeout": {
      "inherited": true,
      "value": 0
    },
    "jwkStoreCacheMissCacheTime": {
      "inherited": true,
      "value": 0
    },
    "tokenEndpointAuthSigningAlgorithm": {
      "inherited": true,
      "value": "string"
    },
    "jwkSet": {
      "inherited": true,
      "value": "string"
    },
    "idTokenSignedResponseAlg": {
      "inherited": true,
      "value": "string"
    },
    "idTokenEncryptionEnabled": {
      "inherited": true,
      "value": true
    },
    "idTokenEncryptionAlgorithm": {
      "inherited": true,
      "value": "string"
    },
    "idTokenEncryptionMethod": {
      "inherited": true,
      "value": "string"
    },
    "idTokenPublicEncryptionKey": {
      "inherited": true,
      "value": "string"
    },
    "clientJwtPublicKey": {
      "inherited": true,
      "value": "string"
    },
    "mTLSTrustedCert": {
      "inherited": true,
      "value": "string"
    },
    "mTLSSubjectDN": {
      "inherited": true,
      "value": "string"
    },
    "mTLSCertificateBoundAccessTokens": {
      "inherited": true,
      "value": true
    },
    "publicKeyLocation": {
      "inherited": true,
      "value": "string"
    },
    "userinfoResponseFormat": {
      "inherited": true,
      "value": "string"
    },
    "userinfoSignedResponseAlg": {
      "inherited": true,
      "value": "string"
    },
    "userinfoEncryptedResponseAlg": {
      "inherited": true,
      "value": "string"
    },
    "userinfoEncryptedResponseEncryptionAlgorithm": {
      "inherited": true,
      "value": "string"
    },
    "requestParameterSignedAlg": {
      "inherited": true,
      "value": "string"
    },
    "requestParameterEncryptedAlg": {
      "inherited": true,
      "value": "string"
    },
    "requestParameterEncryptedEncryptionAlgorithm": {
      "inherited": true,
      "value": "string"
    },
    "tokenIntrospectionResponseFormat": {
      "inherited": true,
      "value": "string"
    },
    "tokenIntrospectionSignedResponseAlg": {
      "inherited": true,
      "value": "string"
    },
    "tokenIntrospectionEncryptedResponseAlg": {
      "inherited": true,
      "value": "string"
    },
    "tokenIntrospectionEncryptedResponseEncryptionAlgorithm": {
      "inherited": true,
      "value": "string"
    }
  },
  "coreUmaClientConfig": {
    "claimsRedirectionUris": {
      "inherited": true,
      "value": [
        "Unknown Type: any"
      ]
    }
  }
}'
https://<tenant-name>.forgeblocks.com/am/json/realms/root/realms/alpha/realm-config/agents/OAuth2Client/postmanAdminClient

Postman Collection Item JSON

{
  "name": "Step 3: Create Administrative OAuth 2.0 Client",
  "request": {
    "method": "PUT",
    "header": [
      {
        "description": "Specifies certain media types which are acceptable for the resource.",
        "key": "accept",
        "type": "text",
        "value": "application/json"
      },
      {
        "description": "The media type of the resource.",
        "key": "Content-Type",
        "type": "text",
        "value": "application/json"
      },
      {
        "description": "Custom header.",
        "key": "X-Requested-With",
        "type": "text",
        "value": "ForgeRock Identity Cloud Postman Collection"
      },
      {
        "description": "SSO token of an administrator. ",
        "key": "{{cookieName}}",
        "type": "text",
        "value": "{{adminSSOToken}}"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \"coreOAuth2ClientConfig\": {\n    \"agentgroup\": \"\",\n    \"status\": {\n      \"inherited\": false,\n      \"value\": \"Active\"\n    },\n    \n    \"userpassword\": \"{{postmanClientSecret}}\",\n    \"clientType\": {\n      \"inherited\": false,\n      \"value\": \"Confidential\"\n    },\n    \"loopbackInterfaceRedirection\": {\n      \"inherited\": true,\n      \"value\": true\n    },\n    \"redirectionUris\": {\n      \"inherited\": false,\n      \"value\": [\n        \"https://httpbin.org/anything\"\n      ]\n    },\n    \"scopes\": {\n      \"inherited\": false,\n      \"value\": [\n        \"fr:idm:*\"\n      ]\n    },\n    \"defaultScopes\": {\n      \"inherited\": true,\n      \"value\": [\n        \"Unknown Type: any\"\n      ]\n    },\n    \"clientName\": {\n      \"inherited\": true,\n      \"value\": [\n        \"Unknown Type: any\"\n      ]\n    },\n    \"authorizationCodeLifetime\": {\n      \"inherited\": true,\n      \"value\": 0\n    },\n    \"refreshTokenLifetime\": {\n      \"inherited\": true,\n      \"value\": 0\n    },\n    \"accessTokenLifetime\": {\n      \"inherited\": true,\n      \"value\": 0\n    }\n  },\n  \"advancedOAuth2ClientConfig\": {\n    \"name\": {\n      \"inherited\": true,\n      \"value\": [\n        \"Unknown Type: any\"\n      ]\n    },\n    \"descriptions\": {\n      \"inherited\": true,\n      \"value\": [\n        \"Unknown Type: any\"\n      ]\n    },\n    \"requestUris\": {\n      \"inherited\": true,\n      \"value\": [\n        \"Unknown Type: any\"\n      ]\n    },\n    \"responseTypes\": {\n      \"inherited\": true,\n      \"value\": [\n        \"Unknown Type: any\"\n      ]\n    },\n    \"grantTypes\": {\n      \"inherited\": false,\n      \"value\": [\n        \"password\"\n      ]\n    },\n    \"contacts\": {\n      \"inherited\": true,\n      \"value\": [\n        \"Unknown Type: any\"\n      ]\n    },\n    \"tokenEndpointAuthMethod\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"sectorIdentifierUri\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"subjectType\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"updateAccessToken\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"clientUri\": {\n      \"inherited\": true,\n      \"value\": [\n        \"Unknown Type: any\"\n      ]\n    },\n    \"logoUri\": {\n      \"inherited\": true,\n      \"value\": [\n        \"Unknown Type: any\"\n      ]\n    },\n    \"policyUri\": {\n      \"inherited\": true,\n      \"value\": [\n        \"Unknown Type: any\"\n      ]\n    },\n    \"isConsentImplied\": {\n      \"inherited\": true,\n      \"value\": true\n    },\n    \"mixUpMitigation\": {\n      \"inherited\": true,\n      \"value\": true\n    }\n  },\n  \"coreOpenIDClientConfig\": {\n    \"claims\": {\n      \"inherited\": true,\n      \"value\": [\n        \"Unknown Type: any\"\n      ]\n    },\n    \"postLogoutRedirectUri\": {\n      \"inherited\": true,\n      \"value\": [\n        \"Unknown Type: any\"\n      ]\n    },\n    \"clientSessionUri\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"defaultMaxAge\": {\n      \"inherited\": true,\n      \"value\": 0\n    },\n    \"defaultMaxAgeEnabled\": {\n      \"inherited\": true,\n      \"value\": true\n    },\n    \"defaultAcrValues\": {\n      \"inherited\": true,\n      \"value\": [\n        \"Unknown Type: any\"\n      ]\n    },\n    \"jwtTokenLifetime\": {\n      \"inherited\": true,\n      \"value\": 0\n    }\n  },\n  \"signEncOAuth2ClientConfig\": {\n    \"jwksUri\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"jwksCacheTimeout\": {\n      \"inherited\": true,\n      \"value\": 0\n    },\n    \"jwkStoreCacheMissCacheTime\": {\n      \"inherited\": true,\n      \"value\": 0\n    },\n    \"tokenEndpointAuthSigningAlgorithm\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"jwkSet\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"idTokenSignedResponseAlg\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"idTokenEncryptionEnabled\": {\n      \"inherited\": true,\n      \"value\": true\n    },\n    \"idTokenEncryptionAlgorithm\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"idTokenEncryptionMethod\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"idTokenPublicEncryptionKey\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"clientJwtPublicKey\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"mTLSTrustedCert\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"mTLSSubjectDN\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"mTLSCertificateBoundAccessTokens\": {\n      \"inherited\": true,\n      \"value\": true\n    },\n    \"publicKeyLocation\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"userinfoResponseFormat\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"userinfoSignedResponseAlg\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"userinfoEncryptedResponseAlg\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"userinfoEncryptedResponseEncryptionAlgorithm\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"requestParameterSignedAlg\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"requestParameterEncryptedAlg\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"requestParameterEncryptedEncryptionAlgorithm\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"tokenIntrospectionResponseFormat\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"tokenIntrospectionSignedResponseAlg\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"tokenIntrospectionEncryptedResponseAlg\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    },\n    \"tokenIntrospectionEncryptedResponseEncryptionAlgorithm\": {\n      \"inherited\": true,\n      \"value\": \"string\"\n    }\n  },\n  \"coreUmaClientConfig\": {\n    \"claimsRedirectionUris\": {\n      \"inherited\": true,\n      \"value\": [\n        \"Unknown Type: any\"\n      ]\n    }\n  }\n}"
    },
    "url": {
      "raw": "{{amUrl}}/json{{realm}}/realm-config/agents/OAuth2Client/{{postmanAdminClientId}}",
      "host": [
        "{{amUrl}}"
      ],
      "path": [
        "json{{realm}}",
        "realm-config",
        "agents",
        "OAuth2Client",
        "{{postmanAdminClientId}}"
      ]
    },
    "description": "Create an OAuth 2.0 client for obtaining scopes as an administrator. The access tokens granted by this client are used to perform administrative tasks throughout this collection."
  },
  "response": [
  ]
}