List a Google login's Business Profile locations
curl --request GET \
--url https://api.social-api.ai/v1/platforms/google/logins/{loginId}/locations \
--header 'Authorization: <api-key>'import requests
url = "https://api.social-api.ai/v1/platforms/google/logins/{loginId}/locations"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.social-api.ai/v1/platforms/google/logins/{loginId}/locations', 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.social-api.ai/v1/platforms/google/logins/{loginId}/locations",
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: <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.social-api.ai/v1/platforms/google/logins/{loginId}/locations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.social-api.ai/v1/platforms/google/logins/{loginId}/locations")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.social-api.ai/v1/platforms/google/logins/{loginId}/locations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 3,
"locations": [
{
"assignable": true,
"assigned_account_id": "<string>",
"assigned_brand_id": "<string>",
"assigned_brand_name": "<string>",
"bio": "Wood-fired pizza since 1998",
"name": "Joe's Pizza (Downtown)",
"platform_account_id": "accounts/123/locations/456"
}
],
"login_email": "joe@example.com",
"login_id": "cred_01J...",
"login_name": "joe@example.com"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Platforms
List a Google login's Business Profile locations
Lists every Business Profile location the login’s stored credential can manage, live from Google, merged with assignment state. Locations added in Google Business Profile after the last authorization appear here without re-authenticating. assignable reflects tenancy only. login_email identifies the Google account itself, and is empty for a login authorized before it was captured.
GET
/
platforms
/
google
/
logins
/
{loginId}
/
locations
List a Google login's Business Profile locations
curl --request GET \
--url https://api.social-api.ai/v1/platforms/google/logins/{loginId}/locations \
--header 'Authorization: <api-key>'import requests
url = "https://api.social-api.ai/v1/platforms/google/logins/{loginId}/locations"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.social-api.ai/v1/platforms/google/logins/{loginId}/locations', 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.social-api.ai/v1/platforms/google/logins/{loginId}/locations",
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: <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.social-api.ai/v1/platforms/google/logins/{loginId}/locations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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.social-api.ai/v1/platforms/google/logins/{loginId}/locations")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.social-api.ai/v1/platforms/google/logins/{loginId}/locations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"count": 3,
"locations": [
{
"assignable": true,
"assigned_account_id": "<string>",
"assigned_brand_id": "<string>",
"assigned_brand_name": "<string>",
"bio": "Wood-fired pizza since 1998",
"name": "Joe's Pizza (Downtown)",
"platform_account_id": "accounts/123/locations/456"
}
],
"login_email": "joe@example.com",
"login_id": "cred_01J...",
"login_name": "joe@example.com"
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}{
"error": {
"code": "resource.not_found",
"message": "Account not found",
"meta": {}
}
}Authorizations
Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...
Path Parameters
Google login (credential) ID