Class TokenChannel


  • public class TokenChannel
    extends Object
    • Constructor Detail

    • Method Detail

      • challenge

        public ChallengeResponse challenge​(ChannelType channel,
                                           String identifier,
                                           ChallengeOptions options)
        Creates a challenge, ie, generates a token to be sent by a given a channel to a given identifier
        Parameters:
        channel - - The channel the token is being delivered
        identifier - - the customer identifier in the given channel
        options - - The challenge workflow configuration
        Throws:
        InvalidIdentifierException - whether the identifier is invalid for the given channel
        TargetOptOutException - whether the target user opted out this service via this channel
        BadRequestException - whether there is an invalid value in the request. The field errorInfo in the BadRequestError describes the invalid value
        OutOfBalanceException - whether there is not enough balance to attend a balance consumer challenge creation
        ForbiddenException - whether requesting an action that provided api key is not allowed
        UnauthorizedException - whether an invalid api key value is provided
        QuotaExceededException - whether Sandbox quota, QPS o QPM have been exceeded
      • getValidationCodeByTestChallengeId

        public TestResponse getValidationCodeByTestChallengeId​(String requestId)
        Retrieves the validation code of a challenge that was previously created with test mode enabled
        Parameters:
        requestId - - The handle to a given challenge
        Throws:
        BadRequestException - whether the requestId format is invalid
        ForbiddenException - whether requesting an action that provided api key is not allowed to perform
        UnauthorizedException - whether an invalid api key value is provided
        QuotaExceededException - whether QPS o QPM have been exceeded
      • getSupportedCountries

        public List<String> getSupportedCountries()
        Retrieves the countries TokenChannel service is available
        Throws:
        QuotaExceededException - whether QPS o QPM have been exceeded
      • getSupportedLanguages

        public List<String> getSupportedLanguages()
        Retrieves the available languages or locales for the token notification templates
        Throws:
        QuotaExceededException - whether QPS o QPM have been exceeded