Not able to perform dataExtension.get(cb);
Chubnapathorn opened this issue · comments
Hello there,
Before I inform anything I want to show how I instantiate the SDK in my code
const ET_Client = require('sfmc-fuelsdk-node');
const IET_Client = new ET_Client(clientId, clientSecret, stack, {
origin: originURL, //String
soapOrigin: soapURL, //String
authOrigin: authURL, //String
authOptions: {
authVersion: authVersion, //String
accountId: MID, //String
applicatioType: 'server'
}
});
I tried to use this function to get the data extension from my MC
Before this 2 3 months Its work fine nothing to worries but, now I tried to connect my custom app
with the new MC Business Unit, I got an error of 'unsupported_grant_type'
var dataExtension = IET_Client.dataExtension(options);
dataExtension.get(function(err, response) {
console.log(err);
}
err :
{
"res":
{
"error":"unsupported_grant_type",
"error_description":"Use "authorization_code" or "refresh_token" or "client_credentials" or "urn:ietf:params:oauth:grant-type:jwt-bearer" as the grant_type.",
"error_uri":"https://developer.salesforce.com/docs"
}
}
I got this data when I try to use dataExtension.get(cb); I'm not so sure what am I do wrong in this process
Expected behavior
I want this function to return the data of the data extension I mean the list of data extension from my business Unit
Environment
- SDK Version 2.4.0
- Node version 10.16.3
The bug has the severity
- Critical: The defect affects critical functionality or critical data. It does not have a workaround.
@Chubnapathorn, I see that you are passing in a String for the authVersion.
Can you please pass in a number for it and see if this was the issue?
@CCBet yes sure but i still got the sane error
In the code that you pasted I see a typo: "applicatioType" instead of "applicationType".
Is this just a copy - paste mistake?
@CCBet Confirm its typo, but I fixed to applicationType and still show the same error