How to find these kind of ID's: "Z2lkOi8vc2hvcGlmeS9Qcm9kdWN0Lzc4NTc5ODkzODQ="

Benjamin_Anders
New Member
8 0 0

In the JS BUY SDK examples, they use id's that are really long, but when I read the (outdated) short introduction to the BUY SDK, they use the regular, short numeric ID's found in the product url's in Shopify's admin.

So I have tried using the regular ID's in my code with no luck. How do I find or convert to these long clunky ID's so I can fetch my products?

And, Shopify! Please add an explanation about this in the introduction in the future!

We are making hand crafted Red Hats together with my mom in Norway.
0 Likes
Jason
Shopify Expert
10272 144 1943

Base64 decode it:

gid://shopify/Product/7857989384

 

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.


★ http://freakdesign.com.au ★
Benjamin_Anders
New Member
8 0 0

Thanks for the reply!

If I want to pick a particular product using the ID i've found in the admin url. How do I turn the ID into that base64 string?

I could take this: 7857989384...

Manually add this: "gid://shopify/Product/"...

And then base64 encode it. But that seems very clunky. Is there no other way to fetch a product by ID?

We are making hand crafted Red Hats together with my mom in Norway.
0 Likes