Integration Lightspeed api with cron job.

Jd_89050Jd_89050 Member Posts: 6

Hi,

I have some questions regarding lightspeed api. As i found that it works with oauth and token , can we use that token with cron jobs with refreshing token every time.

If not what can be better solution for syncing lightspeed data to my website data.

Thanks

3 comments

  • terry_skuplugsterry_skuplugs Member Posts: 4

    I don't think you need a cron job for this. Once you have the initial access token (you might also have a refresh token at that time) you can refresh that anytime, at the same time your app initiates a connection to the external service. So right before you attempt to read or write data from the external service, refresh the token first, then proceed with the API requests.

    In which technology or platform you have developed your website?

    If your website is developed in Woocommerce, Bigcommerce, shopify or Magento, You can try https://skuplugs.com/lightspeed-integration/

  • Jd_89050Jd_89050 Member Posts: 6

    I am trying to get access token and it says

    {"error":"invalid_grant","error_description":"Authorization code doesn't exist or is invalid for the client"}

  • Adrian SamuelAdrian Samuel Moderator, Lightspeed Staff Posts: 603 moderator

    @Jd_89050, since we don't have an event based system, using cron jobs is the only solution to periodically checking for new changes in the system

    I've responded to your question on another thread if you'd like to take a look


    Kind Regards,

    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

Sign In or Register to comment.