Count filtered verification codes
Count filtered verification codes: countFilteredVerificationCodes in the TypeScript, Python, Rust and Go clients.
GET /v1/projects/{id}/platforms/filtered-otp/count
Counts the verification codes Photon kept from this project's dedicated lines, optionally for one platform. Without receivedAfter and receivedBefore the window is the 30 days before the request; a window longer than 366 days is rejected. The response echoes the window it resolved, so the number always says which period it covers. Requires the platforms:read permission bound to the project resource in the path.
photon.projects.platforms.countFilteredVerificationCodes(input: CountFilteredVerificationCodesInput, options?: RequestOptions): Promise<CountFilteredVerificationCodesOutput>photon.projects.platforms.count_filtered_verification_codes(input: CountFilteredVerificationCodesInput, *, options: RequestOptions | None = None) -> models.FilteredVerificationCodeCountclient.count_filtered_verification_codes(id: String, params: Option<CountFilteredVerificationCodesParams>).await -> Result<ResponseValue<types::FilteredVerificationCodeCount>, Error<CountFilteredVerificationCodesError>>client.Projects.Platforms.CountFilteredVerificationCodes(ctx context.Context, params *CountFilteredVerificationCodesParams, opts ...RequestOption) (*FilteredVerificationCodeCount, error)import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.platforms.countFilteredVerificationCodes({
path: {
id: "id",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import CountFilteredVerificationCodesInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.platforms.count_filtered_verification_codes(
CountFilteredVerificationCodesInput.model_validate({
"path": {
"id": "id",
},
})
)use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};
let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
.credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
.build()?;
let result = client
.count_filtered_verification_codes("id".to_owned(), None)
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();import (
"context"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
result, err := client.Projects.Platforms.CountFilteredVerificationCodes(ctx, &photonapi.CountFilteredVerificationCodesParams{
ID: "id",
})
if err != nil {
return err
}
_ = result{
"count": 0,
"receivedAfter": "2026-09-02T00:00:00.000Z",
"receivedBefore": "2026-10-02T00:00:00.000Z"
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
Returns
200 How many codes were filtered in the resolved window. FilteredVerificationCodeCount
Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.
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.