Dear kind Community, help is needed. Shopify Dev support doesn’t answer my email. I’ve posted about this.
When a client installs my embedded app. I would like an accessToken to query any fulfilment orders that I get requested upon.
I am using the latest remix build 2024-10 to get the accessToken:
const { session } = await authenticate.admin(request);
const accessToken = session.accessToken;
In my backend then POST to this URL using the remix generated accessToken.
https://{{store}}.myshopify.com/admin/api/2024-10/graphql.json
With my Headers:
Content-Type: application/json
X-Shopify-Access-Token : shpua_16b0b7267374dc7e9c5ec67a728d8aef
Body JSON:
{
"query": "{ shop { assignedFulfillmentOrders(first: 10, assignmentStatus: FULFILLMENT_REQUESTED) { edges { node { id destination { firstName lastName address1 city province zip countryCode phone } lineItems(first: 10) { edges { node { id productTitle sku remainingQuantity } } } merchantRequests(first: 10, kind: FULFILLMENT_REQUEST) { edges { node { message } } } } } } } }"
}
The response I get is this:
{
"errors": "[API] Invalid API key or access token (unrecognized login or wrong password)"
}
Why is this happening? There is no way for me to regenerate a new Offline AccessToken. Is the X-Shopify-Access-Token the remix generated accessToken?