Changelog
The PHP SDK (php/) keeps its own version, in src/AudienceKit.php (AudienceKit::VERSION), apart from the Swift
and Kotlin SDKs’ VERSION and the Ruby gem’s. Releases are tagged php/<version>.
The latest releases, newest first.
0.2.0 (2026-11-24)
Section titled “0.2.0 (2026-11-24)”The PHP SDK catches up with the Swift, Kotlin, Node, Python and Rust SDKs.
- Models. Every call returns a model (
AudienceKit\Model\Venue,Event,Person,Locale,Admission,Article, …) with typed, read-only properties: dates asDateTimeImmutable, money asMoney, points asCoordinate. A model is still readable as the API’s JSON ($venue['locale']['name']), so code written for 0.1 keeps working;raw()andjson_encode()give that array. Code that checkedis_array()on a result needsinstanceofinstead. - Sign-in.
signInWithGoogle()andconnectGoogle();signInWithApple()takes Sign in with Apple JS’s authorization code, redirect URI and nonce;signInWithReviewCode()for App Review;signInWithFacebookCode()takes another Facebook app (Facebook Login for Business);refreshSession();deleteAccount(). - Service tokens.
useServiceToken('akst_…')trades an audience service token atPOST /v1/token/service, trades it again a minute before the session expires and once when the API refuses it, and sends calls to the instance that issued it.useBearerToken()sends an application API key as is.AudienceSession::fromEnvironment()readsAUDIENCEKIT_TOKEN,AUDIENCEKIT_BASE_URL,AUDIENCEKIT_AUDIENCE_ID,AUDIENCEKIT_HOSTandAUDIENCEKIT_ENVIRONMENT.Credential::$userIdis null for a service session, which carriesscopesandaudience; a credential with noroleis amember’s. - Public listings for websites (
public:read):publicListingsPage(),publicListings(),publicListing(),publicTonight().community()reads the audience, locales, venues, people, events and series in one go. - Soapbox news:
articles(),articlesPage()(“Show more”),nationalArticles(),article(),articlesAbout(),publications(),localPublications(),publication(),myOpEds(),submitOpEd(). - Calendar subscriptions:
calendarFeed(),createCalendarFeed(),followVenueInCalendar(),deleteCalendarFeed(). - Moderation:
reportContent()withReportTarget’s targets and reasons,blockUser(),unblockUser(). - RSVP and cover:
cancelRsvp(),eventRsvp()(who’s going),buyCover()takes a sliding-scale amount,buyCoatCheck(); admissions carrykind,quantity,claimCheckNumber,feeandcreatedAt, a venue’s cover its coat check and scale, andvenueCover()the viewer’s coat check ticket. - Location:
closestLocale()takes aCoordinate(with a beacon), andreportLocation(). - Events carry their KJ, DJ or VJ (
jockeys,jockeyLabel) where the API has them;Event::effectiveHosts()makes a lone jockey the host. SessionCredentialStorekeeps the credential in PHP’s session, for websites that sign people in.- Docs: signing people in, building a website and a reference of every call and model.
- Helpers:
CoverPass::code()makes a pass’s door QR code (the same codes as the other SDKs),Colorparses theme and tag colors,Coordinateparses WKT points and measures distance.Queries::chatRoom()is the chat subscription for apps with their own Action Cable client.
0.1.0 (2026-11-06)
Section titled “0.1.0 (2026-11-06)”First release: a PHP 8.1+ client for the AudienceKit consumer GraphQL API, with the same calls the Swift and Kotlin SDKs make.
AudienceSession: sign in with a Facebook token or OAuth code or an Apple identity token, adopt a credential minted elsewhere, switch audience, sign out;graphQL()runs any operation against/v1/audience/<id>/graphqlon the API instance the credential names, with the SDK, API-version and environment headers every call carries; REST calls (branding(),request()) for what the schema doesn’t cover; errors asAudienceKitExceptionwith the API’s codes.- The shared operations as array-returning helpers:
audience(),me(),venues(),people(),locales(),closestLocale(),events(),event(),eventSeries(),venueDetail(),venueCover(),venueOffers(),admissions(),buyCover(),payCover(),confirmCover(),refundAdmission(),rsvpEvent(),tribes(),identifyWithTribe(),leaveTribe(),registerDevice(),nodeType(),sendChatMessage()andremoveChatMessage(). Documents follow the audience’s modules: when the API refuses a field (undefinedField) the SDK asks the schema which fields the types it reads have and runs the query again with only those. - HTTP through any PSR-18 client and PSR-17 factories (found with php-http/discovery when none is given);
CredentialStorefor keeping the session wherever the app keeps secrets.