Why do I get an error "cookie_not_present" when calling Shopify.trackingConsent.setTrackingConsent()

New Member
1 0 1

Hello! I'm developing an integration with our consent manager to your API and I encountered some error when i tried to call window.Shopify.trackingConsent.setTrackingConsent(true, function(e){console.log(e)});. It returns an error 400. Screen Shot 2020-10-08 at 1.40.36 PM.png

I've tried searching for forums regarding this issue but there were still no responses about it.
For references, these are the forums that I mentioned:

I would like to know if you can look into this issue? Thank you!