Python
import requests
url = "https://api.naga.ac/v1/account/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.naga.ac/v1/account/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl https://api.naga.ac/v1/account/balance \
-H "Authorization: Bearer $NAGA_PROVISIONING_KEY"package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.naga.ac/v1/account/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"balance": "12.4750"
}
Account
Get the account balance
Returns the account’s credit balance. Requires a provisioning key.
GET
https://api.naga.ac
/
v1
/
account
/
balance
Python
import requests
url = "https://api.naga.ac/v1/account/balance"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.naga.ac/v1/account/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl https://api.naga.ac/v1/account/balance \
-H "Authorization: Bearer $NAGA_PROVISIONING_KEY"package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.naga.ac/v1/account/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"balance": "12.4750"
}