Using Akeneo Apps for scheduled syncs of products

54 Views Asked by At

Trying to use Akeneo Apps https://apps.akeneo.com/how-build-app-akeneo-pim . It's more-less clear how access token generated - as response to user in akeneo portal clicks on the connected app. but how to use Akeneo Apps for background product catalog sync between my app and Akeneo? with connector I'd just generate access token based on client id/secret stored in config, but here I need Akeneo portal to pass control to my app... How I can call Akeneo API few days after that?

Tried to see if refresh token can help but 1) it's not returned in https://api.akeneo.com/apps/authentication-and-authorization.html#step-3-get-a-permanent-access-token and 2) even if returned what if because of app downtime I miss the renewal checkpoint and the token gets expired? would need to ask user to login to akeneo

1

There are 1 best solutions below

0
Tseho On

As indicated in https://api.akeneo.com/apps/authentication-and-authorization.html#token-success-response

An Access Token given to an App has no expiration date.

Basically, when an user install your application in his Akeneo PIM, your app will receive an access token that does not expire. Store it somewhere like your database, and then reuse it anytime you want, even days later.

No need for a refresh token.

The Access Token that you will have stored will continue working until a Akeneo PIM user decides to revoke your app.