0

I'm developing a wordpress plugin, which obtains certain product info from the Lightspeed Retail API. I followed the steps in the documentation here http://developers.lightspeedhq.com/retail/authentication/access-token/

I have the Client ID and Client Secret, but I dont have the Temporary Token, I am stuck at this point, I am sure I'm missing some procedure here, can you help me?

This is the current code I use based on the API documentation:

...

    $tokenURL = "https://cloud.lightspeedapp.com/oauth/access_token.php";
    $postFields = [
        'client_id' => 'XXXXXXXXXXXXX',
        'client_secret' => 'XXXXXXXXXXXXX',
        'code' => 'Temporary Token',
        'grant_type' => 'authorization_code'
    ];
...

1 Answers1

0

The temporary token is returned if you follow the instructions here.

You need to start using this URL:

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

which will return after your app is accepted with a code/temporary token.

pritaeas
  • 2,073
  • 5
  • 34
  • 51