Hello.
Code from official publication
curl --request POST \
--url 'https://api.hubapi.com/crm/v3/extensions/calling/APP_ID/settings?hapikey=HUBSPOT_API_KEY' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{"name":"demo widget","url":"https://mywidget.com/widget","height":600,"width":400,"isReady":true}'
My code in Nodejs
var request = require('request');
var options = {
method: 'POST',
url: 'https://api.hubapi.com/crm/v3/extensions/calling/213563/settings',
qs: { hapikey: 'xxxx' },
headers: { accept: 'application/json', 'content-type': 'application/json' },
body: {
isReady: true,
name: 'Test',
width: 260,
url: 'https://mydomain/app',
height: 450
},
json: true,
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
I get this error
{
status: 'error',
message: "This app hasn't been granted all required scopes to make this call. Read more about required scopes here: https://developers.hubspot.com/scopes.",
correlationId: 'b0dca2c3-cefd-4c46-8d53-e15f20719133',
links: { scopes: 'https://developers.hubspot.com/scopes' },
category: 'MISSING_SCOPES',
requestId: 'dd1546fb-4c31-4df2-bef6-ae9226922fb5'
}
That could be from a developer’s account?
Help me please. Thanks.