Boomi Platform API Reference (1.0.0) - EnvironmentOAuth2AccessTokenExtensionGenerationRequest
Download OpenAPI Specification: Download
For more information about Postman collections, forking, and making your first API call, refer to the Working with Boomi APIs on Postman page.
The EnvironmentOAuth2AccessTokenExtensionGenerationRequest object is used to override OAuth2 accessToken fields in multi-install integration packs (iPacks). It supports the OAuth2 authorization code (code) grant type only.
You provide details about the specific environment, extension group, connection, and OAuth client, and the API returns an OAuth2 authorization URL. Use this URL to log in to an authorization server, grant access, and then redirect back to Platform. After that, the remaining flow to record a new access token as an override for the extension group will be performed automatically. When a Connection that requires an OAuth2 access token is released within an iPack, the child account installing the iPack must generate a new token to execute the process that uses it. This object generates a new access token for the child account.
You can also use this object to query the status of a previously submitted access token generation request by providing only the requestId returned from the original request. An requestStatus value of ACCESS_TOKEN_RECEIVED indicates that a new access token has been generated and will be saved as an override.
Required Privileges
You need these privileges in the target environment:
Execute access
- API — Use the Boomi Platform API to access account data.
- Runtime Management (ATOM_MANAGEMENT) — Configure and administer integration runtimes.
- Environment Extensions Edit Access — View and edit Environment Extensions.
Note:
- Use the EnvironmentExtensions object to override the other OAuth2 credential fields. This object only generates a usableaccessTokenfor process execution; fields such asclientIdandclientSecretmust still be available at runtime for actions likeaccessTokenrefresh.
- The field ID foraccessTokenis usuallyoauthOptions/OAuth2Config/credentials/@accessToken, but it can vary depending on the connector type. Use the EnvironmentMapExtensionsSummary query to find the field ID used for the specific connector being overridden.
- The URL returned in the XML response is escaped. If you test the result in a browser, replace&with&.
- Requires a process that uses a connector supporting OAuth2, with theaccessTokenfield set up for extension. TheclientIdandclientSecretfields should also be set up for extension. This process is then packaged and released as a multi-install iPack.
Executes an EnvironmentOAuth2AccessTokenExtensionGenerationRequest
Generates a URL that you can use to log in to an authorization server. After login, the authorization server redirects back to the platform, which requests an accessToken and records it as an override for a specific iPack instance.
You can also call this same endpoint with only a requestId to check the status of a previously submitted access token generation request.
Note: The URL returned in the XML response is escaped. If you test the result in a browser, replace
&with&.
Authorizations:
Request Body schema: optional
Payload containing either the values needed to generate an authorization URL (environmentId, connectionId, extensionGroupId, oAuthFieldId, clientId, clientSecret), or a requestId alone to query the status of a previously submitted request.
| environmentId | string The GUID of the environment where the extensions are being overridden. |
| connectionId | string The component GUID of the connection being overridden. |
| extensionGroupId | string The process ID for the instance of the multi-install iPack. If not provided, the accessToken override applies to the environment instead of a specific iPack. |
| oAuthFieldId | string The field ID of the accessToken for the given connector type. This is usually |
| clientId | string The public ID of the OAuth2 application. If not provided, the platform tries to use the clientId saved in Environment Extensions, if available. |
| clientSecret | string The secret key of the OAuth2 application. |
| requestId | string A temporary ID generated by the platform that can optionally be used to track the access token generation request. Provide only this field to query the status of a previously submitted request. |
Responses
Response Schema:
| authorizationCodeRequestUrl | string The URL used to log in to the authorization server. After login, the authorization server redirects back to the platform with an authorization code. |
| requestId | string A temporary ID generated by the platform that can be used to track the access token generation request. |
| requestStatus | string Enum: "GENERATED_URL" "ACCESS_TOKEN_RECEIVED" "ERROR" "UNKNOWN_REQUEST" The status of the accessToken generation. |
| success | boolean Indicates whether the request was successful. |
Request samples
- Payload
{- "environmentId": "1c950278-db6e-445e-9588-05bd916fe93f",
- "connectionId": "a6b9fdae-25ef-493f-b188-7c1eb8c3585b",
- "extensionGroupId": "ca492848-85bd-424e-85b9-c72690a47e9c",
- "oAuthFieldId": "oauthOptions/OAuth2Config/credentials/@accessToken",
- "clientId": "<Client ID>",
- "clientSecret": "<Client Secret>"
}Response samples
- 200
- 403
- 410
- 503
{- "@type": "EnvironmentOAuth2AccessTokenExtensionGenerationResponse",
- "authorizationCodeRequestUrl": "[URL to Login to Authorization Server]",
- "requestId": "0cd55b17-ae18-4222-b2ea-740d41b1d6ff",
- "requestStatus": "GENERATED_URL",
- "success": true
}