cURL
curl --request GET \
--url https://api.gmbapi.com/external-api/gmb/post \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gmbapi.com/external-api/gmb/post"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gmbapi.com/external-api/gmb/post', 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.gmbapi.com/external-api/gmb/post",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.gmbapi.com/external-api/gmb/post"
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))
}HttpResponse<String> response = Unirest.get("https://api.gmbapi.com/external-api/gmb/post")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gmbapi.com/external-api/gmb/post")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"payload": {
"found": 123,
"page": 123,
"per_page": 123,
"posts": [
{
"id": "<string>",
"post_id": "<string>",
"location_id": "<string>",
"account": "<string>",
"state": "SENDING",
"source": "app",
"create_time": 123,
"published_time": 123,
"update_time": 123,
"scheduled_time": 123,
"search_url": "<string>",
"last_error": {
"status": 123,
"reason": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"at": 123
},
"params": {
"languageCode": "<string>",
"summary": "<string>",
"topicType": "STANDARD",
"callToAction": {
"actionType": "BOOK",
"url": "<string>"
},
"media": [
{
"mediaFormat": "PHOTO",
"sourceUrl": "<string>"
}
],
"event": {
"title": "<string>",
"schedule": {
"startDate": {
"year": 123,
"month": 123,
"day": 123
},
"startTime": {
"hours": 123,
"minutes": 123,
"seconds": 123
},
"endDate": {
"year": 123,
"month": 123,
"day": 123
},
"endTime": {
"hours": 123,
"minutes": 123,
"seconds": 123
}
}
},
"offer": {
"couponCode": "<string>",
"redeemOnlineUrl": "<string>",
"termsConditions": "<string>"
},
"scheduledTime": "2023-11-07T05:31:56Z",
"alertType": "ALERT_TYPE_UNSPECIFIED"
}
}
]
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Posts
List Posts
Lists posts for the account, newest first. Bulk campaign posts are not included. Deleted posts are excluded unless state=DELETED is requested.
GET
/
post
cURL
curl --request GET \
--url https://api.gmbapi.com/external-api/gmb/post \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.gmbapi.com/external-api/gmb/post"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.gmbapi.com/external-api/gmb/post', 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.gmbapi.com/external-api/gmb/post",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.gmbapi.com/external-api/gmb/post"
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))
}HttpResponse<String> response = Unirest.get("https://api.gmbapi.com/external-api/gmb/post")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gmbapi.com/external-api/gmb/post")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"payload": {
"found": 123,
"page": 123,
"per_page": 123,
"posts": [
{
"id": "<string>",
"post_id": "<string>",
"location_id": "<string>",
"account": "<string>",
"state": "SENDING",
"source": "app",
"create_time": 123,
"published_time": 123,
"update_time": 123,
"scheduled_time": 123,
"search_url": "<string>",
"last_error": {
"status": 123,
"reason": "<string>",
"message": "<string>",
"details": [
"<unknown>"
],
"at": 123
},
"params": {
"languageCode": "<string>",
"summary": "<string>",
"topicType": "STANDARD",
"callToAction": {
"actionType": "BOOK",
"url": "<string>"
},
"media": [
{
"mediaFormat": "PHOTO",
"sourceUrl": "<string>"
}
],
"event": {
"title": "<string>",
"schedule": {
"startDate": {
"year": 123,
"month": 123,
"day": 123
},
"startTime": {
"hours": 123,
"minutes": 123,
"seconds": 123
},
"endDate": {
"year": 123,
"month": 123,
"day": 123
},
"endTime": {
"hours": 123,
"minutes": 123,
"seconds": 123
}
}
},
"offer": {
"couponCode": "<string>",
"redeemOnlineUrl": "<string>",
"termsConditions": "<string>"
},
"scheduledTime": "2023-11-07T05:31:56Z",
"alertType": "ALERT_TYPE_UNSPECIFIED"
}
}
]
}
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Lists posts for the account, newest first. Bulk campaign posts are not included.
| Query | Description |
|---|---|
location_id | Restrict to one location |
state | SENDING, SCHEDULED, LIVE, PROCESSING, REJECTED, ERROR, or DELETED. Deleted posts are excluded unless you request state=DELETED |
source | app or external_api |
q | Search on the post summary |
page | 1-based. Default 1 |
per_page | Default 20. Maximum 100 |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Account ID. Required when using an organization token; ignored for account-level tokens.
Optional filter to a single location
Optional. SENDING, SCHEDULED, LIVE, PROCESSING, REJECTED, ERROR, or DELETED. Deleted posts are excluded unless requested explicitly.
Available options:
SENDING, SCHEDULED, LIVE, PROCESSING, REJECTED, ERROR, DELETED Optional filter: app (dashboard individual posts) or external_api. Bulk campaigns are never listed.
Available options:
app, external_api Optional full-text search on the post summary
Page number (1-based). Default 1.
Required range:
x >= 1Results per page. Default 20. Maximum 100.
Required range:
1 <= x <= 100