Repository navigation
v0.179.0
services: Instagram publishing helper (#1117)
New APIs (minor). Nothing to change in apps. See Instagram → Publishing.
Instagram.for(connection, options?)(fromgemi/services) publishes to a connected Instagram account:publishImage,publishCarousel,publishReel,publishStory(each resolves{ mediaId, permalink? }and takes{ signal?, timeoutMs? }),publishingLimit()andcontainerStatus(id).- Containers holding video are polled until
FINISHED(2 s backoff up to 10 s, 5 minute timeout, configurable per publisher withpollIntervalMs,maxPollIntervalMs,timeoutMs). The Graph API version is the provider'sgraphApiVersionunlessgraphApiVersionis passed. - Inputs are checked before any call (caption length, hashtags, @mentions, carousel size, public https media URLs, user tags). Failures throw
InstagramPublishErrorwith acode(invalid_input,permission_denied,rate_limited,quota_exceeded,invalid_media,expired,reconnect_required,transient,unconfirmed,timeout,graph_error). A dead token still marks the connection and throwsOAuthReconnectRequiredError. - Apps that publish through
connection.fetchby hand keep working; switching is optional. - New exports from
gemi/services:Instagram,InstagramPublisher,InstagramPublishError,INSTAGRAM_LIMITSand theInstagram*Post,InstagramPublished,InstagramPublishingLimit,InstagramContainerStatus,InstagramPublisherOptions,InstagramPublishOptions,InstagramPublishErrorCodetypes.