createToken
Creates and returns access and refresh tokens for clients that are authenticated using client secrets. The access token can be used to fetch short-term credentials for the assigned AWS accounts or to access application APIs using bearer
authentication.
Samples
fun main() {
//sampleStart
val resp = ssoOidcClient.createToken {
clientId = "_yzkThXVzLWVhc3QtMQEXAMPLECLIENTID"
clientSecret = "VERYLONGSECRETeyJraWQiOiJrZXktMTU2NDAyODA5OSIsImFsZyI6IkhTMzg0In0"
grantType = "urn:ietf:params:oauth:grant-type:device-code"
deviceCode = "yJraWQiOiJrZXktMTU2Njk2ODA4OCIsImFsZyI6IkhTMzIn0EXAMPLEDEVICECODE"
}
//sampleEnd
}