Skip to content

GET /v1/projects/{id}/platforms/whatsapp-business/numbers/{resourceId}/verification-code

Returns the latest six-digit WhatsApp Business ownership code received by SMS for an active Photon VOIP number, but only when its provider timestamp is strictly newer than the required receivedAfter boundary. receivedAfter must be an RFC 3339 timestamp between this request's arrival time and two minutes before it; once it expires, restart Meta's verification flow with a new boundary. A missing newer code is a retryable 404 with Retry-After: 2. Poll after 2, 4, 8, then 10 seconds, applying ±20% jitter and capping later intervals at 10 seconds. Stop when the original boundary is two minutes old. Responses are never cached. Requires the platforms:write permission bound to the project resource in the path.

photon.projects.platforms.getWhatsappBusinessVerificationCode(input: GetWhatsappBusinessVerificationCodeInput, options?: RequestOptions): Promise<GetWhatsappBusinessVerificationCodeOutput>
import { Photon } from "@photon-ai/api";

const photon = new Photon({
  headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.platforms.getWhatsappBusinessVerificationCode({
  path: {
    id: "id",
    resourceId: "resourceId",
  },
  query: {
    receivedAfter: "2026-01-01T00:00:00Z",
  },
});
{
  "code": "string",
  "receivedAt": "2026-01-01T00:00:00.000Z"
}

Parameters

Photon-VersionPhotonVersion

Selects the API contract date. Without it, the request is served as 2026-07-01.

idstringrequired
resourceIdstringrequired
receivedAfterstring (date-time)required

Returns

200 A verification code received strictly after receivedAfter. Treat it as an authentication secret. GetWhatsappBusinessVerificationCodeResponse

Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.

codestringrequired
receivedAtstring (date-time)required

304 Not Modified. Sent only when If-None-Match matches the ETag of an earlier 200 response for the same representation; no body. No body.

Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.