Cloud function calling Remix Shopify App

Shopify Partner
4 0 0

I am currently developping a Shopify App using Remix. 

Using this app, I want to able to run jobs that update product information.
Using the app, the user can create jobs, specifying informations about the products and type of task they want to perform. The jobs are saved in the DB connected to the App. 
Then, every day (for example), I want to run a Serverless function (I was thinking of hosting it on Vercel) that:

- Gets the jobs the DB (not a problem)

- For each job, calls an API route that I created on the Remix app, that will be in charge of running the job (i.e updating store product information). (problem)


As of now, the requests fails because of the following code;

`const { admin } = await authenticate.admin(request);


It seems that the request cannot be authenticated as admin.

Can you give me details about how I can authenticate the request or, if that's not possible, a different way to accomplish my goal ? 

Many thanks,


Replies 0 (0)