I am issuing a request via Postman
"https://APIKEY:PASSWORD@myexampledomain.myshopify.com/api/2021-04/custom_collections.json"
and I get a true response:
{
"custom_collections": [
{
"id": 264277491901,
"handle": "baran-kategori",
"updated_at": "2021-04-08T18:05:03+03:00",
"published_at": "2021-04-05T16:40:08+03:00",
"sort_order": "best-selling",
"template_suffix": "",
"published_scope": "web",
"title": "Baran Kategori",
"body_html": ""
},
{
"id": 264276377789,
"handle": "category1",
"updated_at": "2021-04-06T14:49:26+03:00",
"published_at": "2021-04-05T16:12:36+03:00",
"sort_order": "best-selling",
"template_suffix": "",
"published_scope": "web",
"title": "Category1",
"body_html": ""
},
{
"id": 264362623165,
"handle": "nike",
"updated_at": "2021-04-08T18:05:03+03:00",
"published_at": "2021-04-06T16:17:49+03:00",
"sort_order": "best-selling",
"template_suffix": "",
"published_scope": "web",
"title": "Nike",
"body_html": ""
}
]
}
when attempting to do the same GET through httpclient or restsharp, I am getting a 401 unauthorized.
{StatusCode: 401, ReasonPhrase: 'Unauthorized', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers: { Date: Thu, 08 Apr 2021 16:12:33 GMT Transfer-Encoding: chunked Connection: keep-alive X-Sorting-Hat-PodId: 188 X-Sorting-Hat-ShopId: 56072536253 Referrer-Policy: origin-when-cross-origin X-Frame-Options: DENY X-ShopId: 56072536253 X-ShardId: 188 WWW-Authenticate: Basic Realm="Shopify API Authentication" Content-Type: application/json; charset=utf-8 Content-Length: 89 }}
What I have tried:
..............................................