At the moment all we have is the sample code in the authorization guide. We may add a sample python temporary token endpoint in the future, but it's significantly more complicated than with PHP. We would have to choose a specific web framework, and some of the code would be specific to that framework.
What are the grant types available? I have tried bearer, and authorization_code but none seem to do the trick. I am pretty sure I have the code right and it seems to point to the grant_type problem.
This error, ""Authorization code doesn't exist or is invalid for the client", usually means that more than 30 seconds have passed since you received the temporary token.
It can also mean that the client ID used in the POST request doesn't match the client ID used to request access (in the first step).
So I was able to piece things together on this and I was able to get the token. I have a few questions here after:
1. do I refresh the token the same way I requested one? 2. in the examples on the website, I keep seeing {AccoundID} Is {AccountID} given or is it the same as Client_ID?
Just noticed this message. I was able to do a connection and pull records from Lightspeed. I did this back in October of 2018, I did not work more on it. I just had too many questions before proceeding so I left it in the backburner.
@Weemo33, This isn't a tutorial, but I have been messing/struggling through creating an api wrapper in python for lightspeed. I am not a "real" python programmer, so this is kind of a mess, but it works for what I needed. I mostly needed to get my data in a position that I could export all my data and leave lightspeed if I needed to, and pull data in to external BI tools. But it is on git if it helps,
14 comments
"error":"invalid_grant","error_description":"Authorization code doesn't exist or is invalid for the client"
At the moment all we have is the sample code in the authorization guide. We may add a sample python temporary token endpoint in the future, but it's significantly more complicated than with PHP. We would have to choose a specific web framework, and some of the code would be specific to that framework.
Lightspeed HQ
Thanks
This error, ""Authorization code doesn't exist or is invalid for the client", usually means that more than 30 seconds have passed since you received the temporary token.
It can also mean that the client ID used in the POST request doesn't match the client ID used to request access (in the first step).
Lightspeed HQ
grant_type
isauthorization_code
.Lightspeed HQ
1. do I refresh the token the same way I requested one?
2. in the examples on the website, I keep seeing {AccoundID}
Is {AccountID} given or is it the same as Client_ID?
thx
http://developers.lightspeedhq.com/retail/authentication/refresh-token/
To get the account ID, use the Account endpoint:
http://developers.lightspeedhq.com/retail/endpoints/Account/
Lightspeed HQ
Lightspeed HQ
Just noticed this message. I was able to do a connection and pull records from Lightspeed. I did this back in October of 2018, I did not work more on it. I just had too many questions before proceeding so I left it in the backburner.
@weemo how you solved this error
"error":"invalid_grant","error_description":"Authorization code doesn't exist or is invalid for the client"
Hey @Jd_89050,
Could you send a code snippet detailing the request you're making?
If you could also private message me your API client details as well I could take look into it
@weemo33 what kind of issues were you running into?
Adrian Samuel
Software Developer
Lightspeed HQ
@Weemo33, This isn't a tutorial, but I have been messing/struggling through creating an api wrapper in python for lightspeed. I am not a "real" python programmer, so this is kind of a mess, but it works for what I needed. I mostly needed to get my data in a position that I could export all my data and leave lightspeed if I needed to, and pull data in to external BI tools. But it is on git if it helps,
https://github.com/EvilConsultant/pyLightspeed