Generate a new API Key
Generates an api key for the specified user.
URL
GET https://api.synodic.ai/v0/{user}/api-key-generate
Headers
- x-api-key:
YOUR_API_KEY
(string)
Path Parameters
- {user}: username (string)
Example Request
- Bash
- Python
- Node.js
- Rust
curl -X GET "https://api.synodic.ai/v0/{user}/api-key-generate" -H "x-api-key: YOUR_API_KEY"
import requests
headers = {
"x-api-key": "YOUR_API_KEY"
}
response = requests.get("https://api.synodic.ai/v0/{user}/api-key-generate", headers=headers)
print(response.json())
const axios = require('axios');
const headers = {
"x-api-key": "YOUR_API_KEY"
};
axios.get("https://api.synodic.ai/v0/{user}/api-key-generate", { headers })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
use reqwest;
fn main() {
let client = reqwest::blocking::Client::new();
let response = client.get("https://api.synodic.ai/v0/{user}/api-key-generate")
.header("x-api-key", "YOUR_API_KEY")
.send()
.expect("Failed to send request");
println!("{:?}", response.text());
}
Example Response
{
"api_key": "AErhF3kYnuxqYAHHjEizoOpEWWSxYprNMvBGGSc1"
}