Hey,
I try to create credentials dynamical using n8n-node. I try to create credentials for Microsoft Onedrive, so credential type is microsoftOneDriveOAuth2Api.
The payload I send to the node is like that:
[
{
"name": "OneDrive Temp Token",
"type": "microsoftOneDriveOAuth2Api",
"data": {
"clientId": "d8617.....",
"clientSecret": ".....,
"authUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
"accessTokenUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/token",
"oauthTokenData": {
"access_token": "eyJhbGciO......",
"refresh_token": "eyJhbGciO...",
"token_type": "Bearer",
"expires_in": 300,
"scope": "openid offline_access Files.ReadWrite.All"
}
}
}
]
Whatever i try, i only get:
NodeApiError: The ‘data’ property must be valid JSON, but cannot be parsed at RoutingNode.runNode
So whatever i prepare the data object for the n8n-node, it doesnt like it. Dont know if the json is not well structured or need to be packed special, or the OneDrive credential needs another structure…
The node is:
Any idea?