CreateConnectionToken
Note
Starting November 7, 2025, you will not be able to create new repository associations in Amazon CodeGuru Reviewer. If you would like to use the service, create repository associations prior to November 7, 2025. To learn about services with capabilities similar to CodeGuru Reviewer, see Amazon CodeGuru Reviewer availability change.
Creates a connection token for third-party repository integration with CodeGuru Reviewer.
Request Syntax
POST /token HTTP/1.1
Content-type: application/json
{
"AuthCode": "string
",
"AuthToken": {
"CreationTime": number
,
"Scopes": [ "string
" ],
"Token": "string
",
"User": "string
"
},
"ProviderType": "string
",
"State": "string
"
}
URI Request Parameters
The request does not use any URI parameters.
Request Body
The request accepts the following data in JSON format.
- AuthCode
-
The authorization code used for establishing the connection.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Pattern:
\S+
Required: No
- AuthToken
-
The authentication token used for establishing the connection.
Type: AuthorizationToken object
Required: No
- ProviderType
-
The type of third-party provider for the connection.
Type: String
Valid Values:
CodeCommit | GitHub | Bitbucket | GitHubEnterpriseServer | S3Bucket
Required: Yes
- State
-
The state parameter used for OAuth flow security.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 256.
Required: No
Response Syntax
HTTP/1.1 200
Content-type: application/json
{
"ConnectionToken": "string"
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- ConnectionToken
-
The generated connection token for third-party repository access.
Type: String
Length Constraints: Minimum length of 8. Maximum length of 2048.
Pattern:
\S+
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
You do not have sufficient access to perform this action.
HTTP Status Code: 403
- InternalServerException
-
The server encountered an internal error and is unable to complete the request.
HTTP Status Code: 500
- ThrottlingException
-
The request was denied due to request throttling.
HTTP Status Code: 429
- ValidationException
-
The input fails to satisfy the specified constraints.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: