API Call | XM Community
Skip to main content

Hi folks,

 

Im trying to validate the 10 digit number through external API. Scenario will be, Respondent enters a 10 digit number. This number should get validated from the external application whether the entered number is registered or not. If registered, respondent should go ahead else it should throws an erroor.

 

Waiting for your replies.

You’ll need to use JS and ajax to do this.  Perhaps the built-in ajax feature select2 would fit - it would display matching numbers as they are typed. If you use Qualtrics validation to display an error message, you’ll need to use a bit a trickery including a hidden question and fake next button.


Hi…

you might need to perform the following steps to validate a 10-digit number through an external API, check if you’re going through the steps along with proper JS and features within qualtrics tool 

  1. Obtain access to an external API that provides number validation services. This API should allow you to send a request with the entered 10-digit number and receive a response indicating whether the number is registered or not.

  2. Determine the authentication and authorization mechanism required by the external API. This may involve obtaining an API key or other credentials to authenticate your requests.

  3. Set up your integration with the external API in your application. This typically involves making HTTP requests to the API endpoints provided by the service.

  4. When a respondent enters a 10-digit number, trigger a request to the external API with the entered number as a parameter.

  5. Handle the response from the API in your application. If the API indicates that the number is registered, allow the respondent to proceed. Otherwise, display an error message indicating that the number is not registered.


Hi…

you might need to perform the following steps to validate a 10-digit number through an external API, check if you’re going through the steps along with proper JS and features within qualtrics tool 

  1. Obtain access to an external API that provides number validation services. This API should allow you to send a request with the entered 10-digit number and receive a response indicating whether the number is registered or not.

  2. Determine the authentication and authorization mechanism required by the external API. This may involve obtaining an API key or other credentials to authenticate your requests.

  3. Set up your integration with the external API in your application. This typically involves making HTTP requests to the API endpoints provided by the service.

  4. When a respondent enters a 10-digit number, trigger a request to the external API with the entered number as a parameter.

  5. Handle the response from the API in your application. If the API indicates that the number is registered, allow the respondent to proceed. Otherwise, display an error message indicating that the number is not registered.

Thanks for your reply Shivam. Can you be more specific about the steps. Can you explain a bit more?


You’ll need to use JS and ajax to do this.  Perhaps the built-in ajax feature select2 would fit - it would display matching numbers as they are typed. If you use Qualtrics validation to display an error message, you’ll need to use a bit a trickery including a hidden question and fake next button.

Can you explain a bit more about this. and if you share any code similar to this. it will be great.


Leave a Reply