

# CreateOAuth2TokenResponseBody
<a name="API_dataplane-signin_CreateOAuth2TokenResponseBody"></a>

Output structure for `CreateOAuth2Token` operation.

Contains flattened token operation outputs for both authorization code and refresh token flows. The response content depends on the `grant_type` from the original request.

## Contents
<a name="API_dataplane-signin_CreateOAuth2TokenResponseBody_Contents"></a>

 ** accessToken **   <a name="signin-Type-dataplane-signin_CreateOAuth2TokenResponseBody-accessToken"></a>
The AWS access credentials.  
Type: [AccessToken](API_dataplane-signin_AccessToken.md) object  
Required: Yes

 ** expiresIn **   <a name="signin-Type-dataplane-signin_CreateOAuth2TokenResponseBody-expiresIn"></a>
The number of seconds until the access token expires.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 900.  
Required: Yes

 ** refreshToken **   <a name="signin-Type-dataplane-signin_CreateOAuth2TokenResponseBody-refreshToken"></a>
Encrypted refresh token with cnf.jkt (SHA-256 thumbprint of presented jwk). Always present in responses (required for both flows).  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 2048.  
Required: Yes

 ** tokenType **   <a name="signin-Type-dataplane-signin_CreateOAuth2TokenResponseBody-tokenType"></a>
Indicates that these are AWS SigV4 credentials. Value is `urn:aws:params:oauth:token-type:access_token_sigv4` for both flows.  
Type: String  
Pattern: `urn:aws:params:oauth:token-type:access_token_sigv4`   
Required: Yes

 ** idToken **   <a name="signin-Type-dataplane-signin_CreateOAuth2TokenResponseBody-idToken"></a>
Contains user identity information. Present only in response when `grant_type=authorization_code`. Not included in token refresh responses  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 4096.  
Required: No

## See Also
<a name="API_dataplane-signin_CreateOAuth2TokenResponseBody_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/signin-2023-01-01/CreateOAuth2TokenResponseBody) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/signin-2023-01-01/CreateOAuth2TokenResponseBody) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/signin-2023-01-01/CreateOAuth2TokenResponseBody) 