Retrieves the AuthenticationUrl for the current authentication session for the AuthenticateCustomer flow block.
For security recommendations, see Connect Customer Chat security best practices.
-
This API can only be called within one minute of receiving the authenticationInitiated event.
-
The current supported channel is chat. This API is not supported for Apple Messages for Business, WhatsApp, or SMS chats.
ConnectionToken is used for invoking this API instead of ParticipantToken.
The Amazon Connect Participant Service APIs do not use Signature Version 4 authentication.
Parameters:
-
session_id
(SessionId)
–
The sessionId provided in the authenticationInitiated event.
-
redirect_uri
(RedirectURI)
–
The URL where the customer will be redirected after Amazon Cognito authorizes the user.
-
connection_token
(ParticipantToken)
–
The authentication token associated with the participant's connection.
Raises:
Source code in docs_src/capo_connectparticipant/_services/connect_participant.py
| def get_authentication_url(
self,
session_id: "capo_connectparticipant.types.session_id.SessionId",
redirect_uri: "capo_connectparticipant.types.redirect_uri.RedirectURI",
connection_token: "capo_connectparticipant.types.participant_token.ParticipantToken",
*,
config_overrides: Optional[ConnectParticipantClientConfig] = None,
) -> "capo_connectparticipant.types.get_authentication_url_response.GetAuthenticationUrlResponse":
"""<p>Retrieves the AuthenticationUrl for the current authentication session for the AuthenticateCustomer flow block. </p> <p>For security recommendations, see <a href="https://docs.aws.amazon.com/connect/latest/adminguide/security-best-practices.html#bp-security-chat">Connect Customer Chat security best practices</a>.</p> <note> <ul> <li> <p>This API can only be called within one minute of receiving the authenticationInitiated event.</p> </li> <li> <p>The current supported channel is chat. This API is not supported for Apple Messages for Business, WhatsApp, or SMS chats.</p> </li> </ul> </note> <note> <p> <code>ConnectionToken</code> is used for invoking this API instead of <code>ParticipantToken</code>.</p> </note> <p>The Amazon Connect Participant Service APIs do not use <a href="https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html">Signature Version 4 authentication</a>.</p>
Args:
session_id: <p>The sessionId provided in the authenticationInitiated event.</p>
redirect_uri: <p>The URL where the customer will be redirected after Amazon Cognito authorizes the user.</p>
connection_token: <p>The authentication token associated with the participant's connection.</p>
Raises:
capo_connectparticipant.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_connectparticipant.errors.internal_server_exception.InternalServerException: <p>This exception occurs when there is an internal failure in the Amazon Connect service.</p>
capo_connectparticipant.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
capo_connectparticipant.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by Amazon Connect.</p>
capo_connectparticipant.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_connectparticipant.types.get_authentication_url_request.GetAuthenticationUrlRequest]",
) -> OperationResponse[
"capo_connectparticipant.types.get_authentication_url_response.GetAuthenticationUrlResponse"
]:
import capo_connectparticipant._operations.amazon_connect_participant_service_lambda.get_authentication_url
output, http_response = (
capo_connectparticipant._operations.amazon_connect_participant_service_lambda.get_authentication_url.get_authentication_url(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetAuthenticationUrl")
)
input_: capo_connectparticipant.types.get_authentication_url_request.GetAuthenticationUrlRequest = {
"session_id": session_id,
"redirect_uri": redirect_uri,
"connection_token": connection_token,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|