Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Not able to perform dataExtension.get(cb); #34

Open
1 task done
Chubnapathorn opened this issue Oct 16, 2019 · 4 comments
Open
1 task done

Not able to perform dataExtension.get(cb); #34

Chubnapathorn opened this issue Oct 16, 2019 · 4 comments
Labels

Comments

@Chubnapathorn
Copy link

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 Chubnapathorn changed the title [BUG] Not able to perform dataExtension.get(cb); Oct 16, 2019
@CCBet
Copy link

CCBet commented Oct 16, 2019

@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?

@Chubnapathorn
Copy link
Author

@CCBet yes sure but i still got the sane error

@CCBet
Copy link

CCBet commented Oct 16, 2019

In the code that you pasted I see a typo: "applicatioType" instead of "applicationType".
Is this just a copy - paste mistake?

@Chubnapathorn
Copy link
Author

@CCBet Confirm its typo, but I fixed to applicationType and still show the same error

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants