Hi Team,
We are trying to use AIO SDK to connect to AEP from our node JS application but the library is throwing an error.
SDK Reference: https://github.com/adobe/aio-lib-customer-profile/blob/master/README.md
Code Snippet:
const http = require('http');
const sdk = require('@adobe/aio-lib-customer-profile');
const hostname = '127.0.0.1';
const port = 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/plain');
res.end('Hello World');
async function sdkTest() {
//initialize SDK - I have provided correct value in code - this is just for reference
const client = await sdk.init('<tenant>', '<iMSOrgId>', 'x-api-key', '<valid auth token>', '[sandbox]')
const profileParams = {
entityId: '079157043',
entityIdNS: 'loyaltyId'
}
const customerProfile = await client.getProfile(profileParams)
}
sdkTest();
});
server.listen(port, hostname, () => {
console.log(`Server running at http://${hostname}:${port}/`);
});
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Thanks, We have received an update, it's an issue with the SDK itself. They have already fixed it.
Reference: https://github.com/adobe/aio-lib-customer-profile/issues/62
Thanks, We have received an update, it's an issue with the SDK itself. They have already fixed it.
Reference: https://github.com/adobe/aio-lib-customer-profile/issues/62
Views
Likes
Replies
Views
Likes
Replies