Client ID
andClient Secret
will be ignored- Supported
Grant type
isImplicit
Authorization URL
is the URL to the deployed service with the path/signin
const Request = require('drequest').Request;
const linkedAccount = async (accessToken) => {
if (!accessToken) {
return;
}
const data = await new Request().post('https://ai-oauth-maxdome.herokuapp.com/linkedAccount', { body: { accessToken } });
return data.linkedAccount;
};
const linkedAccount = {
autoLoginPin: 'autoLoginPin',
customer: { customerId: 'customerId' },
sessionId: 'sessionId',
}
autoLoginPin
: Can be ignored, will be used by the service during the/linkedAccount
to renew the sessioncustomerId
andsessionId
are needed to make a sessioned maxdome request
const maxdome = require('drequest-maxdome').getRequestBuilder();
const SessionOptions = require('drequest-maxdome').SessionOptions;
const assetId = 'assetId';
await maxdome.post('v1/mxd/notepad/%customerId%', [
{ body: { contentId: assetId } },
new SessionOptions(linkedAccount),
]);