Business profiles
Get business linked accounts
Protocols: Linked Device API
Required scope: business:read
GET
/
messaging
/
{session}
/
business
/
linked-accounts
Get business linked accounts
curl --request GET \
--url https://api.polymorfa.com/messaging/{session}/business/linked-accounts \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polymorfa.com/messaging/{session}/business/linked-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/messaging/{session}/business/linked-accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/messaging/{session}/business/linked-accounts"
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))
}false{
"success": true,
"data": {
"facebookPage": {
"hasActiveCTWAAd": true,
"hasCreatedAd": true,
"id": "<string>",
"displayName": "<string>",
"profilePictureUrl": "<string>",
"showOnProfile": true,
"whatsAppAsPageButton": true,
"profileSync": "disable"
},
"facebookBusiness": {
"id": "<string>",
"displayName": "<string>",
"catalogId": "<string>",
"catalogState": "disable"
},
"instagramProfessional": {
"handle": "<string>",
"displayName": "<string>",
"profilePictureUrl": "<string>",
"showOnProfile": true
},
"whatsAppAdIdentity": {
"hasActiveCTWAAd": true,
"hasCreatedAd": true,
"id": "<string>"
}
}
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "Correct the invalid request field.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#invalid-parameter"
}{
"error": {
"type": "authentication_error",
"code": "invalid_credential",
"message": "Supply a valid credential.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#invalid-credential"
}{
"error": {
"type": "permission_error",
"code": "permission_denied",
"message": "The credential does not have access to this resource.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#permission-denied"
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "The resource is unavailable to this caller.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#resource-not-found"
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "An unexpected service failure occurred. Keep the request ID for support.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#internal-error"
}Authorizations
Polymorfa organization key (pmfa_ prefix), project token (pmfa_pt_ prefix) where supported, or short-lived client token (pmfa_ct_ prefix). Organization and project keys may be personal or service-account owned and enforce selected action scopes. Organization keys cover the team and its projects; project tokens stay inside one project. Client tokens stay inside their live project and session and enforce their client rules.
Path Parameters
Identifier of the connected Polymorfa session.
⌘I
Get business linked accounts
curl --request GET \
--url https://api.polymorfa.com/messaging/{session}/business/linked-accounts \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polymorfa.com/messaging/{session}/business/linked-accounts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/messaging/{session}/business/linked-accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/messaging/{session}/business/linked-accounts"
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))
}false{
"success": true,
"data": {
"facebookPage": {
"hasActiveCTWAAd": true,
"hasCreatedAd": true,
"id": "<string>",
"displayName": "<string>",
"profilePictureUrl": "<string>",
"showOnProfile": true,
"whatsAppAsPageButton": true,
"profileSync": "disable"
},
"facebookBusiness": {
"id": "<string>",
"displayName": "<string>",
"catalogId": "<string>",
"catalogState": "disable"
},
"instagramProfessional": {
"handle": "<string>",
"displayName": "<string>",
"profilePictureUrl": "<string>",
"showOnProfile": true
},
"whatsAppAdIdentity": {
"hasActiveCTWAAd": true,
"hasCreatedAd": true,
"id": "<string>"
}
}
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_parameter",
"message": "Correct the invalid request field.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#invalid-parameter"
}{
"error": {
"type": "authentication_error",
"code": "invalid_credential",
"message": "Supply a valid credential.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#invalid-credential"
}{
"error": {
"type": "permission_error",
"code": "permission_denied",
"message": "The credential does not have access to this resource.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#permission-denied"
}{
"error": {
"type": "invalid_request_error",
"code": "resource_not_found",
"message": "The resource is unavailable to this caller.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#resource-not-found"
}{
"error": {
"type": "api_error",
"code": "internal_error",
"message": "An unexpected service failure occurred. Keep the request ID for support.",
"param": null
},
"data": null,
"docs": "https://docs.polymorfa.com/api/errors#internal-error"
}