403 (Forbidden) - Product Variations only




I am trying to fetch the product variations, however I keep getting this error “403 (Forbidden)”.
Using the exact same method, but changing “variations” to “products”, “collections” or “categories” works perfectly. Is there some kind of restriction for product variations that is not mentioned in the API Docs? Or is there another reason for this? Has anybody else encountered this problem?

I am using the url path stated in the Docs " https://api.moltin.com/v2/variations". I’ve also tried to append a valid variation ID, but with the same result.

I hope someone can help me out :sweat_smile:


Are you using an implicit grant_type token? You need to use a client_credentials grant_type. I just checked the docs and it does not appear to be outlined. Could you try adjusting the grant_type to client_credentials and let me know if that works. If so I can look to clear up the docs.


Well - it seems like you might be correct as looking into the logged error tells me “Your current grant type does not have the required permissions to fulfill this request”. However adding my client_secret didn’t solve the issue. Rebuilding the project and running it stills gives me the same error which seems kinda odd.


Hi again!

I got it to work after changing credentials. It turns out that if you haven’t properly created the variations (I lacked the last step of assigning some modifiers and creating child products) then you get this error too. Which is rather misleading :sweat_smile:

But it’s working now and you might want to emphasize that you need the client_credentials in the docs as you suggested :blush:


Awsome, I just updated the docs. https://docs.moltin.com/basics/authentication/permissions. Also we have walked through the variation process in our developer portal. https://developers.moltin.com/guides/product/using-product-variations

Hope this helps


Yeah - it was after I found that and followed it completely that I found the solution :smile: Thank you for your help!