I have tried using HttpClient from angular.
export class RegisterationService {
constructor(private http : HttpClient) { }
connectShopify(){
return this.http.get('https://shop-name.myshopify.com/admin/api/2022-04/shop.json', {headers: {"Access-Control-Allow-Origin":"*", 'Content-Type': 'application/Json', 'X-Shopify-Access-Token': 'access_token'}})}
But this is giving me the following error.
https:/shop-name.myshopify.com/admin/api/2022-04/shop.json
CORS Missing Allow Origin
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://sanklecha-clothing.myshopify.com/admin/api/2022-04/shop.json. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 401.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://sanklecha-clothing.myshopify.com/admin/api/2022-04/shop.json. (Reason: CORS request did not succeed). Status code: (null).