Account Info
Get details about your account: credits remaining, stats, etc..
GET
https://api.apiframe.pro/account
Headers
Name | Value |
---|---|
Content-Type |
|
Authorization* | Your APIFRAME API Key |
Response
{
"email": "coolme@coolw.com",
"credits": 12000,
"total_images": 695,
"plan": "starter"
}
// Bad request
{
"errors": [{ msg: "Invalid request" }]
}
// Invalid API Key
{}
// A server error occured
{}
Code samples
const axios = require('axios');
let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://api.apiframe.pro/account',
headers: {
'Authorization': 'YOUR_API_KEY'
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import requests
url = "https://api.apiframe.pro/account"
payload = {}
headers = {
'Authorization': 'YOUR_API_KEY'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.apiframe.pro/account',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: YOUR_API_KEY'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.apiframe.pro/account")
.method("GET", body)
.addHeader("Authorization", "YOUR_API_KEY")
.build();
Response response = client.newCall(request).execute();
var headers = {
'Authorization': 'YOUR_API_KEY'
};
var dio = Dio();
var response = await dio.request(
'https://api.apiframe.pro/account',
options: Options(
method: 'GET',
headers: headers,
),
);
if (response.statusCode == 200) {
print(json.encode(response.data));
}
else {
print(response.statusMessage);
}
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.apiframe.pro/account");
request.Headers.Add("Authorization", "YOUR_API_KEY");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
require "uri"
require "net/http"
url = URI("https://api.apiframe.pro/account")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "YOUR_API_KEY"
response = https.request(request)
puts response.read_body
Last updated