Add n8n community node, /api/v1/render alias, and job webhooks for OSS automation.
Payment-free self-hosted builds keep full API access with optional webhookUrl callbacks and the published n8n-nodes-songs2vid package source under integrations/n8n.
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
import type {
|
||||
IAuthenticateGeneric,
|
||||
ICredentialTestRequest,
|
||||
ICredentialType,
|
||||
INodeProperties,
|
||||
} from "n8n-workflow";
|
||||
|
||||
/**
|
||||
* Songs2VID REST auth — cloud accepts Authorization: Bearer only.
|
||||
* Paste the raw key (s2yt_live_…) or a full "Bearer …" value.
|
||||
*/
|
||||
export class Songs2VidApi implements ICredentialType {
|
||||
name = "songs2VidApi";
|
||||
|
||||
displayName = "Songs2VID API";
|
||||
|
||||
documentationUrl = "https://songs2vid.com/docs/n8n";
|
||||
|
||||
properties: INodeProperties[] = [
|
||||
{
|
||||
displayName: "API Key",
|
||||
name: "apiKey",
|
||||
type: "string",
|
||||
typeOptions: { password: true },
|
||||
default: "",
|
||||
required: true,
|
||||
description:
|
||||
"Developer+ key from Dashboard → Settings (starts with s2yt_live_). Sent as Authorization: Bearer.",
|
||||
},
|
||||
{
|
||||
displayName: "Base URL",
|
||||
name: "baseUrl",
|
||||
type: "string",
|
||||
default: "https://songs2vid.com",
|
||||
required: true,
|
||||
description: "Cloud origin or self-hosted base (no trailing slash).",
|
||||
},
|
||||
];
|
||||
|
||||
authenticate: IAuthenticateGeneric = {
|
||||
type: "generic",
|
||||
properties: {
|
||||
headers: {
|
||||
Authorization:
|
||||
'={{ $credentials.apiKey.toString().startsWith("Bearer ") ? $credentials.apiKey : "Bearer " + $credentials.apiKey }}',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
test: ICredentialTestRequest = {
|
||||
request: {
|
||||
baseURL: "={{ $credentials.baseUrl.replace(/\\/$/, \"\") }}",
|
||||
url: "/api/v1/user/api-keys",
|
||||
method: "GET",
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user