Meta Business Agent
Set connector credentials
Set or rotate the connector's credentials in place: kind: api_key, kind: oauth
(client credentials) or kind: certificate (mTLS client certificate). Meta has no call
that removes a credential layer; change the connector's auth_type or delete it instead.
Authorization
bearerAuth AuthorizationBearer <token>
API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
accountId*string
WhatsApp social account id (the number must be managed through the Cloud API).
connectorId*string
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.businessagent.setBusinessAgentConnectorCredentials({ path: { accountId: 'account_abc123', connectorId: 'connector_abc123', }, body: { kind: 'api_key', api_key_config: { headers: [ { field_name: 'Example', value: 'string', }, ], query_params: [ { field_name: 'Example', value: 'string', }, ], body_params: [ { field_name: 'Example', value: 'string', }, ], }, },});console.log(data);{ "name": "string", "description": "string", "base_url": "http://example.com", "connector_protocol": "string", "auth_type": "OAUTH2_CLIENT_CREDENTIALS", "auth_config": { "oauth2_client_credentials": { "token_url": "http://example.com", "scopes_to_request": [ "string" ], "token_request_content_type": "string", "client_id": "string", "client_secret": "string" }, "api_key": { "headers": [ { "field_name": "string", "value": "string", "prefix": "string" } ], "query_params": [ { "field_name": "string", "value": "string", "prefix": "string" } ], "body_params": [ { "field_name": "string", "value": "string", "prefix": "string" } ] } }, "user_auth_injection_config": { "location": "string", "field_name": "string", "prefix": "string" }, "requires_certificate": true, "id": "string", "mcp_tool_sync": {}, "mtls_config": {}, "connection_status": { "status": "string", "error_message": "string" }}Was this page helpful?