Maytapi icon

Maytapi

Integrate with Maytapi WhatsApp Unofficial API

Session → Connect with Phone Number

AI-generated

Overview

The node integrates with the Maytapi WhatsApp Unofficial API, enabling automation of various WhatsApp-related actions. Specifically, the Session - Connect with Phone Number operation allows connecting a WhatsApp session using a phone number instead of scanning a QR code. This is useful in scenarios where you want to programmatically establish a WhatsApp session for a given phone number without manual intervention.

Practical examples:

  • Automatically connect a new WhatsApp session for a user by providing their phone number.
  • Reconnect sessions remotely when QR code scanning is not feasible.
  • Manage multiple WhatsApp sessions in bulk by connecting them via phone numbers.

Properties

Name Meaning
Phone ID Source Select how to provide the Phone ID: either "From Credentials" (default) or "Custom".
Phone ID The custom Phone ID of your WhatsApp instance (required if "Custom" Phone ID Source).
Phone Number The phone number to connect with (without country code prefix like "+").

Output

The output JSON contains the response from the Maytapi API after attempting to connect the session with the provided phone number. It typically includes success status and any relevant session information returned by the API.

No binary data is output for this operation.

Example output structure:

{
  "success": true,
  "message": "Session connected successfully",
  // additional session details as returned by the API
}

Dependencies

  • Requires an API key credential for authenticating with the Maytapi API.
  • The node uses the Maytapi API base URL https://api.maytapi.com/api.
  • Proper configuration of credentials with a valid Phone ID or specifying a custom Phone ID is necessary.

Troubleshooting

  • Error: "Phone ID is required."
    Occurs if no Phone ID is provided either via credentials or custom input. Ensure that the Phone ID is set correctly.

  • Error: Unsupported operation
    Happens if the operation or resource parameters are incorrect or unsupported. Verify that "Session" resource and "Connect with Phone Number" operation are selected.

  • API errors related to invalid phone number format
    Make sure the phone number is entered without the "+" prefix and follows the expected format.

  • Timestamp errors (not applicable here but common in other operations)
    For time-based operations, ensure timestamps are in the future and correctly formatted.

Links and References

Discussion