Now I’m gonna write this error only to help people because I have been searching community forum for this;
It is giving me this error which I couldn’t understand even though I tried different combinations of data types the body;
request.body.data is not of a type(s) number,request.body.data is not of a type(s) boolean,request.body.data is not of a type(s) boolean
my data;
{
"name": "Joe's Github Credentials",
"type": "imap",
"data": {
"user": "[email protected]",
"password": "12345678rterg",
"host": "imap.gmail.com",
"port": "993",
"secure": "true",
"allowUnauthorizedCerts": "false"
}
}
I also tried to make the fields of boolean with 1 and 0.
But I found a solution for that, it is about sending data types in the right way;
YOURHOST/api/v1/credentials/schema/imap
On the last part of url (imap), use the type of your node that you use credentials in. To find the type, download your workflow and examine it as it is json and find the names from credentials parts of the json.
After you put the right type on this get request;

And fill the body;
{
"additionalProperties": false,
"type": "object",
"properties": {
"apiKey": {
"type": "YOURAPIKEY"
},
"domain": {
"type": "YOURHOSTADDRESS"
}
},
"required": [
"apiKey",
"domain"
]
}
You will have all the structure of the data;
{
"additionalProperties": false,
"type": "object",
"properties": {
"user": {
"type": "string"
},
"password": {
"type": "string"
},
"host": {
"type": "string"
},
"port": {
"type": "number"
},
"secure": {
"type": "boolean"
},
"allowUnauthorizedCerts": {
"type": "boolean"
}
},
"required": [
"user",
"password",
"host",
"port",
"secure",
"allowUnauthorizedCerts"
]
}
And don’t use any → “”
For boolean and number values;
{
"name": "Joe's Github Credentials",
"type": "imap",
"data": {
"user": "[email protected]",
"password": "12345678rterg",
"host": "imap.gmail.com",
"port": 993,
"secure": true,
"allowUnauthorizedCerts": false
}
}