Overview
This node generates an authentication token for the Aliyun Intelligent Speech Service (NLS). It is useful when you need to programmatically obtain a valid token to access Aliyun's speech-related APIs, such as speech recognition or synthesis. By automating token generation, this node helps integrate Aliyun NLS services into workflows without manual token management.
Practical examples include:
- Automatically generating tokens before sending audio data for speech-to-text conversion.
- Refreshing tokens in scheduled workflows to maintain uninterrupted access to Aliyun speech services.
Properties
| Name | Meaning |
|---|---|
| Access Key ID | The user's Aliyun Access Key ID used to authenticate API requests. |
| Access Key Secret | The secret key corresponding to the Access Key ID, used to securely sign requests. |
Output
The node outputs JSON data with a single field:
result: Contains the generated token string from Aliyun NLS service. This token can be used in subsequent API calls to authenticate requests.
No binary data output is produced by this node.
Example output JSON structure:
{
"result": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Dependencies
- Requires network access to Aliyun's token generation endpoint.
- Needs valid Aliyun credentials: Access Key ID and Access Key Secret.
- Uses an internal utility function (
fetchAliyunToken) to perform the token request.
No additional environment variables or n8n-specific configurations are required beyond providing the credentials.
Troubleshooting
- Invalid Credentials: If the Access Key ID or Secret is incorrect, token generation will fail. Verify that the credentials are correct and have necessary permissions.
- Network Issues: Failure to reach Aliyun's token service due to connectivity problems will cause errors. Ensure the node has internet access.
- Expired or Revoked Keys: Using expired or revoked keys will prevent token issuance. Check the status of your Aliyun account keys.
- Error Messages: Errors returned from the token fetch function typically indicate authentication failure or service unavailability. Review error details and retry accordingly.
Links and References
- Aliyun Intelligent Speech Service Documentation (replace with actual URL)
- Aliyun Access Key Management