I'm trying to add products to my guest cart, passing the guest_id in the url and the listings_id in the body. This is the method:
addToGuestCart(){
this.http.post(`https://openapi.etsy.com/v2/guests/${this.guest.guest_id}/carts?api_key=my-api-key`, this.product.listing_id)
.first()
.subscribe(()=>this.getGuest());
}
I get this cors error:
XMLHttpRequest cannot load https://openapi.etsy.com/v2/guests/akye30nuit6ua/carts?api_key=my-api-key. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4200' is therefore not allowed access. The response had HTTP status code 500.