Parameter passing for API Client Redirect URI

jbrownjbrown Posts: 10Member

I'm currently developing a module in PrestaShop for a client who is now using Lightspeed. And I'm creating a screen in the PS admin to authenticate with LS. The issue i'm facing is with the RedirectURI. PS admin pages require a single use token as a url parameter. i'd like to be able to generate and pass this token to the authentication page and then have that token appended to the RedirectURI.


What I would like to achieve is to be able to generate something like following link to be displayed in the PS backoffice:

https://cloud.lightspeedapp.com/oauth/authorize.php?response_type=code&client_id={client_id}&scope={scope}&param1={prestashoptoken}


The param1 would then be available for use in the Redirect URI that I could configure like:

https://myprestashopsite.com/admin/modules/mymodule/code?code={code}&token={param1}


If i was able to do something like this, LS authentication and authorization could be integrated into the backoffice of PS and avoid an invalid token error.

I don't imagine this is possible right ?


Thanks.

2 comments

Sign In or Register to comment.