Stack Exchange
unable to create webhook using API in shopify
I created webhook from the admin console and getting the output whenever I call webhook. But unable to create or get webhook from the API. 
In GET: am getting this, but I created webhook though console.
{
     "webhooks": []
 }

In POST -  am sending this
{
  "webhook": {
    "topic": "customers/create",
    "address": "https://testdomain.com/",
    "format": "json"
  }
}

output - am getting is  200 OK
<html>
    <body>
        <noscript>
            <a href="https://app.shopify.com/services/login/identity?destination_uuid=4396f4b2-b554-45ab-88a9-bf7da732f505&amp;return_to=https%3A%2F%2Fapp.shopify.com%2Fservices%2Flogin%2Fidentity_callback%3Fshop_name%3Ddevelopoment%26state%3DqX6mDDWTqxz7Bw20FWgPNT1HtHtVHdMIOFyKmQGFYCrX9l2_xsr150XwMUbY0z0TRaPiT65TSupUoIJSz1HCmHqH-_KxZPuR8nkCsBg23mKAYTUdIkBfjFtHtuLtPy3WBh7gDr8m-nrMsmdw_afBt31It902ABnK6pZAj9abkzjlZIm4sxkl5xUroPVHk3Y5Zv7-EvOdOT7Lko0gVWzKY05vxevb5TxZp0BNfeI1qts%253D&amp;ui_locales=en&amp;upgradeable=false&amp;ux=shop">Continue</a>
        </noscript>
        <script type="text/javascript">
      window.location = "https:\/\/app.shopify.com\/services\/login\/identity?destination_uuid=4396f4b2-b554-45ab-88a9-bf7da732f505\u0026return_to=https%3A%2F%2Fapp.shopify.com%2Fservices%2Flogin%2Fidentity_callback%3Fshop_name%3Ddevelopoment%26state%3DqX6mDDWTqxz7Bw20FWgPNT1HtHtVHdMIOFyKmQGFYCrX9l2_xsr150XwMUbY0z0TRaPiT65TSupUoIJSz1HCmHqH-_KxZPuR8nkCsBg23mKAYTUdIkBfjFtHtuLtPy3WBh7gDr8m-nrMsmdw_afBt31It902ABnK6pZAj9abkzjlZIm4sxkl5xUroPVHk3Y5Zv7-EvOdOT7Lko0gVWzKY05vxevb5TxZp0BNfeI1qts%253D\u0026ui_locales=en\u0026upgradeable=false\u0026ux=shop";
    </script>
    </body>
</html>

and webhook is not creating.

What you trying to GET in first code frame?

@Kamil, I was trying to get the list of webhooks which i created through admin portal or from api, but i didn't get any.

Webhooks created in the ADMIN will never show up to your API calls because they were not made with your API key. You only ever see webhooks you created with the API key used. It seems you also have an authentication problem, that could be hampering your progress.

I was sending cookies with my POST request, after clearing, it worked.
