Oath Token:

LightUserLightUser Member Posts: 16

Hi. Lightspeed Newbie here.

I am banging my head trying to figure out how to get Oath Token Request on POSTMAN to work.


Here are my steps:

1) First I registered my client with Lightspeed using a dummy url https://localhost

2) I got my client ID and client secret key, both of which I saved for safe keeping

3) I opened a web browser and entered the following line into to address bar + ENTER:

"https://cloud.lightspeedapp.com/oauth/authorize.php?response_type=code&client_id=[myclientID]&scope=employee:all"

4) I get redirected to localhost, and up at the top of the address bar is code=xxxxxxxxx. I believe this is the temporary access token?

5) I now open up POSTMAN, import the environment variables from the the file "Retail Developers.postman_environment.json". I edit the CLIENT_ID and CLIENT_SECRET to match what I got when i registered.

6) Using the OAuth template provided by lightspeed for POSTMAN, I send the following POST request: "https://{{host}}/oauth/access_token.php" , where I pass in a [code] parameter that happens to set to the temporary access token i got in step no. 4.

7) Executing the above command on POSTMAN gives me the following error response: "This client is invalid or must authenticate using a client secret"


What am i doing wrong here?

2 comments

Sign In or Register to comment.