Ajax icon

Ajax

Consume Ajax API (v.0.1.2)

Actions242

Overview

This node, named "Ajax," is designed to interact with the Ajax API (version indicated in the code). It supports multiple resources and operations, including user management tasks such as requesting a change to a user's phone number. The node acts as a flexible interface to perform various Ajax API calls within an n8n workflow.

For the User resource and specifically the Request To Change User's Phone operation, the node allows you to initiate a request to update a user's phone number by providing necessary authentication and validation details. This can be useful in scenarios where user contact information needs to be updated securely, for example, when a user changes their phone number and the system must verify the new number via SMS or call.

Practical examples:

  • Automating user profile updates after receiving a phone number change request.
  • Integrating phone number verification workflows triggered by external systems.
  • Managing user contact data centrally through n8n automation.

Properties

Name Meaning
User Id The unique identifier of the user whose phone number is to be changed.
Password Hash A hash of the user's password used for authentication to authorize the phone change.
Phone Validation Type Method to validate the new phone number; options are CALL or SMS.
New Phone The new phone number to assign to the user.

Output

The node outputs JSON data representing the response from the Ajax API after attempting to request the phone number change. This typically includes status information about the request, any validation messages, and confirmation details if successful.

If the operation involves binary data (not indicated here), it would represent related media or files returned by the API, but for this operation, output is expected to be purely JSON.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • The node depends on internal modules handling HTTP requests, state management, and operation resolution.
  • Proper configuration of the API credential in n8n is necessary before use.

Troubleshooting

  • Authentication errors: If the API key or password hash is incorrect, the node will fail to authenticate. Verify credentials and ensure the password hash is correctly generated.
  • Validation failures: If the phone validation type or new phone number is invalid or not supported, the API may return errors. Ensure the phone number format matches expected standards and that the validation type is either CALL or SMS.
  • Network issues: Connectivity problems to the Ajax API endpoint can cause timeouts or failures. Check network access and API availability.
  • Missing required parameters: All properties marked as required must be provided; otherwise, the node will throw errors before making the API call.

Links and References

  • Ajax API Documentation (general reference for Ajax API)
  • n8n documentation on creating custom nodes
  • General info on phone number validation methods (SMS vs Call) can be found in telecommunication standards references.

Discussion