Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F10360536
HttpBinApi.credentials.ts
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
HttpBinApi.credentials.ts
View Options
import
{
IAuthenticateGeneric
,
ICredentialTestRequest
,
ICredentialType
,
INodeProperties
,
}
from
'n8n-workflow'
;
export
class
HttpBinApi
implements
ICredentialType
{
name
=
'httpbinApi'
;
displayName
=
'HttpBin API'
;
documentationUrl
=
'<your-docs-url>'
;
properties
:
INodeProperties
[]
=
[
{
displayName
:
'Token'
,
name
:
'token'
,
type
:
'string'
,
default
:
''
,
},
{
displayName
:
'Domain'
,
name
:
'domain'
,
type
:
'string'
,
default
:
'https://httpbin.org'
,
},
];
// This allows the credential to be used by other parts of n8n
// stating how this credential is injected as part of the request
// An example is the Http Request node that can make generic calls
// reusing this credential
authenticate
=
{
type
:
'generic'
,
properties
:
{
headers
:
{
Authorization
:
'={{"Bearer " + $credentials.token}}'
,
},
},
}
as
IAuthenticateGeneric
;
// The block below tells how this credential can be tested
test
:
ICredentialTestRequest
=
{
request
:
{
baseURL
:
'={{$credentials?.domain}}'
,
url
:
'/bearer'
,
},
};
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 8, 07:13 (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1033736
Default Alt Text
HttpBinApi.credentials.ts (1 KB)
Attached To
Mode
rNPN n8n-phabricator-node
Attached
Detach File
Event Timeline
Log In to Comment