cURL
curl --request GET \
--url https://api-dev.messagefy.io/api/v1/Admin/ApiKey \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api-dev.messagefy.io/api/v1/Admin/ApiKey"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api-dev.messagefy.io/api/v1/Admin/ApiKey', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-dev.messagefy.io/api/v1/Admin/ApiKey",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-dev.messagefy.io/api/v1/Admin/ApiKey"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-dev.messagefy.io/api/v1/Admin/ApiKey")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.messagefy.io/api/v1/Admin/ApiKey")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"apiKey": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resourcePlan": {
"resourcePlanId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"limit": 123,
"seconds": 123
},
"account": {
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"status": {
"accountStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canManageChildObjects": true,
"canSendAndReceiveMessage": true
},
"organization": {
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"status": {
"organizationStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canManageChildObjects": true,
"canSendAndReceiveMessage": true
},
"accountCount": 123,
"channelCount": 123,
"deviceRunningCount": 123,
"channelConnectedCount": 123,
"apiKeyCount": 123,
"createdAt": "2023-11-07T05:31:56Z"
},
"channelCount": 123,
"deviceRunningCount": 123,
"channelConnectedCount": 123,
"financialManagerCount": 123,
"apiKeyCount": 123
},
"organization": {
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"status": {
"organizationStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canManageChildObjects": true,
"canSendAndReceiveMessage": true
},
"accountCount": 123,
"channelCount": 123,
"deviceRunningCount": 123,
"channelConnectedCount": 123,
"apiKeyCount": 123,
"createdAt": "2023-11-07T05:31:56Z"
},
"type": "<string>"
}
]{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}API Keys
Listar API Keys
Lista todas as API Keys cadastradas
GET
/
api
/
v1
/
Admin
/
ApiKey
cURL
curl --request GET \
--url https://api-dev.messagefy.io/api/v1/Admin/ApiKey \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api-dev.messagefy.io/api/v1/Admin/ApiKey"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api-dev.messagefy.io/api/v1/Admin/ApiKey', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-dev.messagefy.io/api/v1/Admin/ApiKey",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-dev.messagefy.io/api/v1/Admin/ApiKey"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api-dev.messagefy.io/api/v1/Admin/ApiKey")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.messagefy.io/api/v1/Admin/ApiKey")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"apiKey": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"resourcePlan": {
"resourcePlanId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"limit": 123,
"seconds": 123
},
"account": {
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"status": {
"accountStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canManageChildObjects": true,
"canSendAndReceiveMessage": true
},
"organization": {
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"status": {
"organizationStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canManageChildObjects": true,
"canSendAndReceiveMessage": true
},
"accountCount": 123,
"channelCount": 123,
"deviceRunningCount": 123,
"channelConnectedCount": 123,
"apiKeyCount": 123,
"createdAt": "2023-11-07T05:31:56Z"
},
"channelCount": 123,
"deviceRunningCount": 123,
"channelConnectedCount": 123,
"financialManagerCount": 123,
"apiKeyCount": 123
},
"organization": {
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"status": {
"organizationStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canManageChildObjects": true,
"canSendAndReceiveMessage": true
},
"accountCount": 123,
"channelCount": 123,
"deviceRunningCount": 123,
"channelConnectedCount": 123,
"apiKeyCount": 123,
"createdAt": "2023-11-07T05:31:56Z"
},
"type": "<string>"
}
]{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Authorizations
Chave de API fornecida pelo painel administrativo do MessageFy. Enviada no header de cada requisição. O gateway APISIX valida a chave e injeta os headers X-Consumer-* automaticamente.
Query Parameters
Response
OK