Search code examples
shopifylaravel-8webhooksshopify-app

App Must Verify The Authenticity Of The Request From Shopify


Expected HTTP 401 (Unauthorized), but got HTTP 405 from shop-redact. Your app's HTTPS webhook endpoints must validate the HMAC digest of each request, and return an

HTTP 401 (Unauthorized)

response when rejecting a request that has an invalid digest.

Screenshot

I have used osiset/laravel-shopify package

I have solved this error. Even though one app has been approved, the other app has the same solution in front of it, I still get this error from Shopify in the other app.

  1. First I tried this solution in which the app was rejected. But I applied the same solution in the first app, which was approved

     Route::get('/shop-redact',[AbcController::class,'shopRedact'])->middleware('auth.webhook')->name('shop.redact');
    
  2. And then I tried to create a job for all GDPR webhook but the app was rejected https://github.com/osiset/laravel-shopify/wiki/GDPR

What is the other solution to this?


Solution

  • Shopify webhooks make POST request to your endpoint so set post request

    Route::post('/shop-redact',[AbcController::class,'shopRedact'])->middleware('auth.webhook')->name('shop.redact');