Získat přístupové údaje pro push notifikace
curl --request GET \
--url https://rest-api.smsmngr.com/v1/push/credentials \
--header 'x-api-key: <api-key>'import requests
url = "https://rest-api.smsmngr.com/v1/push/credentials"
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://rest-api.smsmngr.com/v1/push/credentials', 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://rest-api.smsmngr.com/v1/push/credentials",
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://rest-api.smsmngr.com/v1/push/credentials"
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://rest-api.smsmngr.com/v1/push/credentials")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest-api.smsmngr.com/v1/push/credentials")
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{
"success": true,
"senders": [
{
"sender": "com.example.app",
"shared": false,
"fcm": {
"project_id": "my-app-12345",
"client_email": "firebase-adminsdk-abc12@my-app-12345.iam.gserviceaccount.com",
"updated_at": "2026-11-02T09:15:00.000Z"
},
"apns": {
"key_id": "ABC123DEFG",
"team_id": "DEF123GHIJ",
"bundle_id": "com.example.app",
"environment": "production",
"updated_at": "2026-11-02T09:20:00.000Z"
},
"webpush": {
"subject": "mailto:dev@example.com",
"public_key": "BJy-ArPuXCYMb6SxER7fQMFOYgnpgNg6rgHWMD_NhK9RmO0TcJcJQza8Zm54rDQeVKmB_KAv1Ux0EgBfzLVqdn0",
"updated_at": "2026-11-02T09:25:00.000Z"
}
},
{
"sender": "com.example.driver",
"shared": true,
"fcm": null,
"apns": null,
"webpush": {
"subject": "mailto:dev@example.com",
"public_key": "BOp7yb2mGmRs2cA0rU8XrA4kqzv5Mh3oGQ0HnVf1kq9i0dD2Ylq3Zr0Wm5c4YQ3nXo9wE8u7d6s5a4F3g2H1j0k",
"updated_at": "2026-11-03T08:00:00.000Z"
}
}
]
}Push, Messenger a Instagram
Získat přístupové údaje pro push notifikace
Vrací push odesílatele (aplikace) volajícího klíče a přístupové údaje pro push notifikace, které každý z nich má. Nenastavená platforma má hodnotu null. Privátní klíče se nikdy nevracejí.
Web Push public_key (VAPID) je ze své podstaty veřejný — vaše PWA ho předává do PushManager.subscribe() jako applicationServerKey. Načtěte ho zde jednou (na serveru) a vložte do buildu PWA; API klíč do aplikace nikdy nevkládejte.
Vyžaduje API klíč se scope full nebo rest-api.
GET
/
push
/
credentials
Získat přístupové údaje pro push notifikace
curl --request GET \
--url https://rest-api.smsmngr.com/v1/push/credentials \
--header 'x-api-key: <api-key>'import requests
url = "https://rest-api.smsmngr.com/v1/push/credentials"
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://rest-api.smsmngr.com/v1/push/credentials', 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://rest-api.smsmngr.com/v1/push/credentials",
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://rest-api.smsmngr.com/v1/push/credentials"
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://rest-api.smsmngr.com/v1/push/credentials")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://rest-api.smsmngr.com/v1/push/credentials")
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{
"success": true,
"senders": [
{
"sender": "com.example.app",
"shared": false,
"fcm": {
"project_id": "my-app-12345",
"client_email": "firebase-adminsdk-abc12@my-app-12345.iam.gserviceaccount.com",
"updated_at": "2026-11-02T09:15:00.000Z"
},
"apns": {
"key_id": "ABC123DEFG",
"team_id": "DEF123GHIJ",
"bundle_id": "com.example.app",
"environment": "production",
"updated_at": "2026-11-02T09:20:00.000Z"
},
"webpush": {
"subject": "mailto:dev@example.com",
"public_key": "BJy-ArPuXCYMb6SxER7fQMFOYgnpgNg6rgHWMD_NhK9RmO0TcJcJQza8Zm54rDQeVKmB_KAv1Ux0EgBfzLVqdn0",
"updated_at": "2026-11-02T09:25:00.000Z"
}
},
{
"sender": "com.example.driver",
"shared": true,
"fcm": null,
"apns": null,
"webpush": {
"subject": "mailto:dev@example.com",
"public_key": "BOp7yb2mGmRs2cA0rU8XrA4kqzv5Mh3oGQ0HnVf1kq9i0dD2Ylq3Zr0Wm5c4YQ3nXo9wE8u7d6s5a4F3g2H1j0k",
"updated_at": "2026-11-03T08:00:00.000Z"
}
}
]
}Was this page helpful?