Portainer icon

Portainer

Interact with Portainer via API

Actions190

Overview

This node provides an operation to authenticate a user by sending their credentials to an authentication endpoint. It is useful in scenarios where you need to verify user identity before allowing access to further API operations or workflows. For example, it can be used to log in users to a service, validate session tokens, or initiate authenticated sessions programmatically.

Properties

Name Meaning
Body Credentials used for authentication. This should be a string containing the necessary authentication data (e.g., JSON with username and password).

Output

The node outputs JSON data representing the response from the authentication request. This typically includes authentication tokens, user information, or error messages depending on the success or failure of the authentication attempt.

If the authentication is successful, the output JSON will contain relevant authentication details such as tokens or session identifiers. If unsuccessful, it may contain error descriptions.

No binary data output is indicated.

Dependencies

  • Requires an API key or token credential to authenticate requests to the target service.
  • The base URL for the API must be configured in the node's credentials.
  • The node sends HTTP requests with Content-Type and Accept headers set to application/json.

Troubleshooting

  • Invalid Credentials Error: If the authentication fails, ensure that the "Body" property contains correctly formatted and valid credentials.
  • Network or Endpoint Errors: Verify that the API base URL is correct and accessible.
  • Missing or Invalid API Key: Ensure that the required API authentication token or key is properly configured in the node credentials.
  • Malformed Request Body: Confirm that the body string is valid JSON or matches the expected format by the authentication endpoint.

Links and References

  • Refer to the API documentation of the service you are authenticating against for the exact format of the credentials and expected responses.
  • General n8n documentation on HTTP Request nodes and authentication best practices.

Discussion