Alan Fitch
11/21/2021, 7:42 AMaccess_token
I am trying to use it to make a request to a restlet.
I am adding the header:
Authorization: Bearer ${auth_token}
But I keep getting
The error LOGIN_REQD
battk
11/21/2021, 7:53 AMbattk
11/21/2021, 7:53 AMINVALID_LOGIN_ATTEMPT
Alan Fitch
11/21/2021, 7:53 AMAlan Fitch
11/21/2021, 7:54 AMexport async function runnetsuitequery(command: string, args: (number | string)[], token: string){
const path = root + "/app/site/hosting/restlet.nl?cript=1884&deploy=1"
const body = {
command, args
}
const headers = {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
}
const response = await fetch(path, {
method: 'POST',
body: JSON.stringify(body),
headers: headers
})
return response.json()
}
battk
11/21/2021, 7:54 AMbattk
11/21/2021, 7:55 AMAlan Fitch
11/21/2021, 7:55 AMbattk
11/21/2021, 7:55 AMAlan Fitch
11/21/2021, 7:56 AMAlan Fitch
11/21/2021, 7:56 AMAlan Fitch
11/21/2021, 7:59 AM