Skip to content

Commit 20dbf38

Browse files
authored
Merge pull request #190 from lumapps/chore/docs-setup-service-user-token
chore(docs): use /service/user/token to retrieve token
2 parents 3204626 + 5e1d4a0 commit 20dbf38

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ Python >= 3.8
3939
Once connected, open the javascript console of your browser and run:
4040

4141
```javascript
42-
var instance = window.location.pathname.split('/');
43-
instance = instance[1] == "a" ? instance[3] : instance[1]
44-
fetch(window.location.origin+"/service/init?customerHost="+window.location.host+"&instanceSlug="+instance+"& slug=").then(data=>{return data.json()}).then(res => {console.log(res.token)})
42+
fetch(window.location.origin+"/service/user/token", {method: "POST"})
43+
.then(data => {return data.json()})
44+
.then(res => {console.log(res.token)});
4545
```
4646

4747
This will generate your personal LumApps token that will be active for 60 minutes, and that we will use in the following steps

docs/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ Python >= 3.8
3939
Once connected, open the javascript console of your browser and run:
4040

4141
```javascript
42-
var instance = window.location.pathname.split('/');
43-
instance = instance[1] == "a" ? instance[3] : instance[1]
44-
fetch(window.location.origin+"/service/init?customerHost="+window.location.host+"&instanceSlug="+instance+"& slug=").then(data=>{return data.json()}).then(res => {console.log(res.token)})
42+
fetch(window.location.origin+"/service/user/token", {method: "POST"})
43+
.then(data => {return data.json()})
44+
.then(res => {console.log(res.token)});
4545
```
4646

4747
This will generate your personal LumApps token that will be active for 60 minutes, and that we will use in the following steps

0 commit comments

Comments
 (0)