Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Token without a session

Solved

Token without a session

GeorgeStrongg
Tourist
8 0 1

Hi, everyone. 

Me and my team are currently experiencing some issues with a token.

We wonder if it's possible to get a token without a session by using API in order to create metafields.

 

We are working on plugins for shopify and we need to test em without a session.

Maybe there's a way to use a method to pass authorization and then receive a token which we can use in requests. 

Or some other ideas?

 

Thanks

Accepted Solution (1)

Liam
Community Manager
3108 344 909

This is an accepted solution.

Hi George,

 

Are you getting the token from an app in the CLI or via the admin? Why is having a session attached not working for your team?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 2 (2)

Liam
Community Manager
3108 344 909

This is an accepted solution.

Hi George,

 

Are you getting the token from an app in the CLI or via the admin? Why is having a session attached not working for your team?

Liam | Developer Advocate @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

GeorgeStrongg
Tourist
8 0 1

Liam, hi mate. Really appreciate 4 ur reply. 

Thank you for your quick response(tbh didn't expect that 😅). I realize I need to provide more details, so here it goes!

I'm reaching out on behalf of our back-s.

 

We are currently utilizing the /admin/api/2024-01/products/632910392/metafields.json endpoint for creating product metafields in our application. As part of the header parameters, we're including X-Shopify-Access-Token: access_token.

To streamline our process, we are curious about the possible endpoints or methods available for obtaining this access token. Additionally, we are interested in understanding if there is a way to acquire the access_token in the background. This is crucial for our workflow as we aim to post metafields across various shops and products.