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.

Where is access token to be used by node @shopify/admin-api-client

Where is access token to be used by node @shopify/admin-api-client

JackJack1
Shopify Partner
15 0 4

I am trying to develop an app that queries the stores which installed my app. I will basically request the orders for the last week.

 

@Shopify/admin-api-client seems to be the way to go on the nodejs. However, I cannot find where my access token is? It is really frustrating as the documentation is very limited on details. I have client ID and secret but I cannot see the panel that reveals the access code. I developed my app using the cli by choosing remix. Could you provide a pointer please?

 

Thanks

Replies 4 (4)

Liam
Community Manager
3108 344 904

Hi Jack,

 

You'll need to use the client ID and client secret to exchange a session token for an access token, in an API call to `https://{shop}.myshopify.com/admin/oauth/access_token`. 

 

There's an example of this in our developer docs here

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

JackJack1
Shopify Partner
15 0 4

Hi Liam,

 

May I kindly ask clarity about the below?

 

Do I have to acquire accessToken to be able to use shopify-api for node? If so, do I have to create an oauth approval at nodejs? This is for an embedded public app...

 

If I have to use the exchange instead, could you please let me know what subject_token and subject_token_type are?

 

Many thanks

nhm1990
Shopify Partner
6 0 1

For all those who want to integrate the Admin API into their Hydrogen storefront:

I still wasted almost 2 days trying to generate an access token with the mentioned POST request.

However, this is not necessary because you can simply generate the token with a new app. (See screenshot)

 

screenshot.png

kurs
Shopify Partner
12 0 1

I have similar issue. And found this yt tutorial: https://www.youtube.com/watch?v=2Gk_RUu-RDs. I know it's been quite some time, but maybe it will help someone.