Kiwify

Consumir API Kiwify

Actions3

Overview

This node integrates with the Kiwify API, specifically supporting operations related to sales data and authentication. The "Autenticação - Gerar Token" operation allows users to exchange an OAuth authorization code for an access token. This is useful in scenarios where you need to authenticate your application with Kiwify's API using OAuth 2.0, enabling subsequent authorized API requests.

Practical example: After a user completes the OAuth authorization flow and obtains an authorization code, this node operation can be used to generate an access token by providing the client credentials and redirect URI. The token can then be used to access protected resources on behalf of the user.

Properties

Name Meaning
Client ID The Client ID provided by Kiwify for your OAuth application.
Client Secret The Client Secret provided by Kiwify for your OAuth application (input is masked).
Código de Autorização The authorization code obtained from the OAuth authorization flow.
URI de Redirecionamento The redirect URI configured in your OAuth application, must match the one used in the flow.

Output

The output JSON contains the response from the Kiwify OAuth token endpoint. Typically, this includes:

  • access_token: The OAuth access token to authenticate further API requests.
  • token_type: The type of token issued (usually "Bearer").
  • expires_in: The lifetime in seconds of the access token.
  • refresh_token: A token that can be used to obtain new access tokens.
  • Other OAuth-related fields as returned by Kiwify.

No binary data is output by this operation.

Dependencies

  • Requires an active internet connection to reach Kiwify's public API at https://public-api.kiwify.com/v1/oauth/token.
  • Requires valid OAuth client credentials (Client ID and Client Secret) from Kiwify.
  • The node expects the authorization code to be obtained beforehand via the OAuth authorization flow.
  • No additional environment variables or n8n-specific configurations are required beyond standard API credential setup.

Troubleshooting

  • Invalid Client Credentials: If the Client ID or Client Secret is incorrect, the API will reject the request. Verify these values in your Kiwify developer console.
  • Invalid or Expired Authorization Code: The authorization code must be fresh and unused. Codes expire quickly and can only be used once.
  • Redirect URI Mismatch: The redirect URI provided must exactly match the one registered in your OAuth app settings.
  • Network Issues: Ensure your n8n instance can reach the Kiwify API endpoint.
  • Error Messages: The node returns error messages from the API in the output JSON under an error field if the request fails. Review these messages for clues.

Links and References

Discussion