App reviews, troubleshooting, and recommendations
Hello everyone,
I am trying to provide extraHeaders in the Shopify REST Client, when I do requests, to verify the call at my HTTPS endpoint. For some reason it dosen't work though. I am fairly new to JS and Shopify, so if someone could maybe help me out, I would appreciate it.
const extraHeaders = {
headers:
{'Server-Authentication': 'xxxxxxxxxx'}
};
export async function createWebhook(shop, token) {
const baseUrl = getBaseUrl(shop);
const url = baseUrl+'/admin/api/2021-07/webhooks.json';
const body = {
"webhook": {
"topic": "products/update",
"address": "https://www.xxxxxxxxx.com/api/webhooks/",
"format": "json"
}
}
try{
const client = new Shopify.Clients.Rest(shop, token);
const result = await client.post({
path: 'webhooks',
data: body,
type: DataType.JSON,
extraHeaders: extraHeaders,
});
console.log(result);
return result;
}catch(err){
console.error(`Error creating a new Webhook: `, err)
}
}
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025