Hello,
I built a shopify app using the Remix template. i made a custom loader in app._index.tsx and used console.log to get the access token from the session object:
export const loader = async ({ request }: LoaderFunctionArgs) => {
const { admin, session, } = await authenticate.admin(request);
console.log(session);
return null;
}
But when i call the admin API through Postman or other ways (for the same eshop), i get the error “Invalid API key or access token (unrecognized login or wrong password)”. I haven’t reinstalled the app so the access token remains the same, right? (it seems to be an offline access token). here is the output from the consoloe.log above:
Session {
id: ‘offline_niai-gr.myshopify.com’,
shop: ‘niai-gr.myshopify.com’,
state: ‘’,
isOnline: false,
scope: ‘write_products’,
expires: undefined,
accessToken: ‘…’,
onlineAccessInfo: undefined
}