Error: publishing integration "missing_scopes"

Good afternoon, when you publish the application in this way

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: 'xxxx',
 links: { scopes: 'https://developers.hubspot.com/scopes' },
 category: 'MISSING_SCOPES',
 requestId: 'dd1546fb-4c31-4df2-bef6-ae9226922fb5'
}

Please help me understand what I am doing wrong. Thanks!

Hi @vitalikbuz

I can see that this is a duplicate post to your other query here: https://community.hubspot.com/t5/APIs-Integrations/When-i-post-integration-i-get-error/m-p/329667

As such, I will reply in your original and close this one off. As a sidenote, when posting your source code, please be sure to remove any sensitive information such as API keys as these were left in your code. I have removed them now but for security reasons, you may wish to rotate your key.

Thanks!