Skip to content

Commit 8015b7d

Browse files
committed
missing sample.env
1 parent 3166664 commit 8015b7d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

sample-server/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ const doPost = async (url, bodyparams, headers) => {
405405
try {
406406
const response = await fetch(url, { method: 'POST', body: JSON.stringify(bodyparams), headers});
407407
if (!response.ok) {
408+
//console.log(await response.json());
408409
throw new Error('Request failed with code ' + response.status)
409410
}
410411
return response.json();
@@ -417,6 +418,7 @@ const doGet = async (url, params, headers) => {
417418
try {
418419
const response = await fetch(`${url}?` + new URLSearchParams(params), {method: 'GET', headers});
419420
if (!response.ok) {
421+
//console.log(await response.json());
420422
throw new Error('Request failed with code ' + response.status)
421423
}
422424
return response.json();

sample-server/sample.env

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
API_URL=https://demo-api.incodesmile.com
2+
API_KEY=you-api-key
3+
FLOW_ID=Flow or Workflow Id from your Incode dashboard.
4+
ADMIN_TOKEN=Needed for the webhooks to be able to fetch Scores and auto-approve

0 commit comments

Comments
 (0)