Authentication
Use API keys for authenticating programmatic access to the Compute Engine API
The Signaloid Cloud Compute Engine API uses API keys to authenticate your requests before allowing them to proceed. The value of an API key is a string with a secret value that only you know. You must send your valid API key with every request to the Signaloid Cloud Compute Engine API.
API Key Authentication Flow
Using API keys is the simplest and fastest way to get started with making requests to the Signaloid Cloud Compute Engine API.
To create an API key, go to the API keys section in the Settings page of the Signaloid Cloud Developer Platform. From there you can create a new API key. To authenticate yourself when making requests to the Signaloid Cloud Compute Engine API, simply add the API key to the Authorization Header as shown in the code snippets below:
- cURL
- TypeScript
- Go
- Python
curl --location --request GET 'https://api.signaloid.io/tasks' \
--header 'Authorization: scce_yourSignaloidCloudApiKey'
let myHeaders = new Headers();
myHeaders.append("Authorization", "scce_yourSignaloidCloudApiKey");
let requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow",
};
fetch("https://api.signaloid.io/tasks", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
package main
import ( "fmt" "net/http" "io/ioutil")
func main() {
url := "https://api.signaloid.io/tasks"
method := "GET"
client := &http.Client {}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "scce_yourSignaloidCloudApiKey")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
import http.client
conn = http.client.HTTPSConnection("api.signaloid.io")
headers = { 'Authorization': 'scce_yourSignaloidCloudApiKey'}
conn.request("GET", "/tasks", '', headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))