Nasty BUG!!! Refresh token call gives inconsistent responses

MartienPoelsMartienPoels Member Posts: 1


I already had to alter the json responses on several api calls as they appear not to follow a consistent model, sometimes a string, sometimes an array is in the responses. Probably because of the use of php which is not type safe.

To my opinion json responses should follow a consistent class model. But due to development timelines I had to build a json text interpreter to correct those inconsistent responses, very nasty of course but I had to get it running...

But now I'm suffering from a even worse situation. When I want to to refresh the token the response of the attribute "expires_in" now sometimes is a string and sometimes an integer. According to the documentation is should be an integer. For months is has been, and now sometimes it is a string. I get a response like this:

{"access_token":"3b78afd6f48ce.....2bf4d58d586399","expires_in":"1800","token_type":"bearer","scope":"employee:register employee:customers systemuserid:957079"}

Sorry, I already have a lot of json manipulation built in my json response handlers due to inconsistent responses but this goes beyond any common sense. So please repair this a soon as possible as my integration is really suffering from this behaviour.

Regards Martien Poels

1 comment

  • LucienVersendaalLucienVersendaal Moderator, Lightspeed Staff Posts: 991 moderator

    Hi @MartienPoels,

    Thank you for contacting us.

    Sorry for delay in answering your question.

    Our devs are aware of this problem. We filed a BUG for this one. Now it's up to our devs to fix this. Unfortunately, I can't give you any ETA. What I do is creating a ticket for you and attach the issue to it. When there are any updated about this issue, you'll get notified automatically.

Sign In or Register to comment.