コンテンツにスキップ
Influence
Esc
↑↓移動↵開く⌘Jプレビュー

バイナリ画像のアップロードを確定

mediaImport で準備したアップロード情報を、元の JPEG、PNG、WebP のバイト列(最大 3145728 バイト)で確定します。バイト数と SHA-256 は準備した情報と一致する必要があります。ファイル参照や大きなローカルファイルには、記載のメディアツールや SDK のマルチパートアップロードを使用してください。

POST/api/v1/media/import
認可
AuthorizationBearer トークン · header必須

権限範囲を指定した Influence API キー、または対応する OAuth アクセストークンを使用します。認証情報を URL やツールの入力に含めないでください。

ヘッダーパラメーター
X-Publish-ConfirmationConfirmationCapability必須

prepare が返した confirmationCapability の値をそのまま使用します。expiresAt より前に、同じ入力とともに、このヘッダーだけで送信してください。

最小長: 32 · 最大長: 4096 · ^[A-Za-z0-9._~-]+$ に一致
Idempotency-KeyIdempotencyKey必須

クライアントが作成する再試行用 ID です。結果が不明な場合は、このキー、確認用の権限値、入力を保持してください。

最小長: 16 · 最大長: 200 · ^[A-Za-z0-9._:-]+$ に一致
X-Publish-Uploadstring必須

準備した mediaImport 入力の encodeURIComponent(JSON.stringify(upload)) です。デコード後のオブジェクトは BinaryUploadDescriptor に従います。エンコード後のヘッダーは最大 4096 文字です。

最大長: 4096
リクエスト本文
必須application/octet-stream
string<binary>
レスポンス
200

メディアの結果です。ok とファイルの状態を確認してください。

次のうち1つのみ:
object
okboolean必須
output__schema0必須
プロパティを表示
__schema0
toolNamestring必須
指定できる値:adAuditQuoteadAuditStartadAuditGetadAuditListsearchfetchprofileGetconnectionStatusGetaccountListwhatsappContactListwhatsappTemplateListwhatsappMediaListcampaignGetcampaignListcampaignDraftSavemediaListmediaImportmediaUploadCreatemediaUploadPartmediaUploadCompletemediaUploadGetmediaUploadAbortmediaGetcampaignReviewcampaignReviewGetcampaignReviewExecutecampaignScheduleBatchReviewcampaignScheduleBatchExecutescheduleListbrandContextGetinsightsAccountListinsightsPostListinsightsRefreshcampaignPlanGetcampaignPlanGenerateimageGenerationQuoteimageGenerationStartimageGenerationListintegrationListgroupListintegrationSchemadevtoOrganizationListdevtoTagListdiscordChannelListdiscourseCategoryListdiscourseTagListdiscourseTopicSearchdribbbleTeamListghostAuthorListghostNewsletterListghostTagListghostTierListhashnodePublicationListlemmyCommunitySearchlistmonkListsGetlistmonkTemplateListmattermostChannelListmeweGroupListpinterestBoardListredditSubredditRequirementsGetredditSubredditSearchslackChannelListteamsChannelListtiktokCreatorInfoGetvkDestinationListwhopCompanyListwhopExperienceListwordpressCategoryListwordpressPostTypeListwordpressTagListwrapcastChannelSearchintegrationSchedulePostToolpostsListToolpostSettingsToolgenerateVideoOptionsvideoFunctionToolgenerateVideoToolgenerateImageTooluploadFromUrlTool
object
errorobject必須
プロパティを表示
codestring必須
指定できる値:INVALID_INPUTFORBIDDENNOT_FOUNDCONFLICTFEATURE_DISABLEDCONFIRMATION_REQUIREDCONFIRMATION_INVALIDUPSTREAM_FAILEDNEEDS_REVIEWINTERNAL
messagestring必須
最小長: 1 · 最大長: 2048
retryableboolean必須
okboolean必須
toolNamestring必須
指定できる値:adAuditQuoteadAuditStartadAuditGetadAuditListsearchfetchprofileGetconnectionStatusGetaccountListwhatsappContactListwhatsappTemplateListwhatsappMediaListcampaignGetcampaignListcampaignDraftSavemediaListmediaImportmediaUploadCreatemediaUploadPartmediaUploadCompletemediaUploadGetmediaUploadAbortmediaGetcampaignReviewcampaignReviewGetcampaignReviewExecutecampaignScheduleBatchReviewcampaignScheduleBatchExecutescheduleListbrandContextGetinsightsAccountListinsightsPostListinsightsRefreshcampaignPlanGetcampaignPlanGenerateimageGenerationQuoteimageGenerationStartimageGenerationListintegrationListgroupListintegrationSchemadevtoOrganizationListdevtoTagListdiscordChannelListdiscourseCategoryListdiscourseTagListdiscourseTopicSearchdribbbleTeamListghostAuthorListghostNewsletterListghostTagListghostTierListhashnodePublicationListlemmyCommunitySearchlistmonkListsGetlistmonkTemplateListmattermostChannelListmeweGroupListpinterestBoardListredditSubredditRequirementsGetredditSubredditSearchslackChannelListteamsChannelListtiktokCreatorInfoGetvkDestinationListwhopCompanyListwhopExperienceListwordpressCategoryListwordpressPostTypeListwordpressTagListwrapcastChannelSearchintegrationSchedulePostToolpostsListToolpostSettingsToolgenerateVideoOptionsvideoFunctionToolgenerateVideoToolgenerateImageTooluploadFromUrlTool
400

リクエストが無効です。クエリパラメーターは受け付けません。入力検証の失敗はツールエラー形式で返される場合があります。

次のうち1つ以上:
TransportError
errorobject必須
プロパティを表示
codestring必須
messagestring必須
retryableboolean必須
ToolError
errorobject必須
プロパティを表示
codestring必須
指定できる値:INVALID_INPUTFORBIDDENNOT_FOUNDCONFLICTFEATURE_DISABLEDCONFIRMATION_REQUIREDCONFIRMATION_INVALIDUPSTREAM_FAILEDNEEDS_REVIEWINTERNAL
messagestring必須
最小長: 1 · 最大長: 2048
retryableboolean必須
okboolean必須
toolNamestring必須
指定できる値:adAuditQuoteadAuditStartadAuditGetadAuditListsearchfetchprofileGetconnectionStatusGetaccountListwhatsappContactListwhatsappTemplateListwhatsappMediaListcampaignGetcampaignListcampaignDraftSavemediaListmediaImportmediaUploadCreatemediaUploadPartmediaUploadCompletemediaUploadGetmediaUploadAbortmediaGetcampaignReviewcampaignReviewGetcampaignReviewExecutecampaignScheduleBatchReviewcampaignScheduleBatchExecutescheduleListbrandContextGetinsightsAccountListinsightsPostListinsightsRefreshcampaignPlanGetcampaignPlanGenerateimageGenerationQuoteimageGenerationStartimageGenerationListintegrationListgroupListintegrationSchemadevtoOrganizationListdevtoTagListdiscordChannelListdiscourseCategoryListdiscourseTagListdiscourseTopicSearchdribbbleTeamListghostAuthorListghostNewsletterListghostTagListghostTierListhashnodePublicationListlemmyCommunitySearchlistmonkListsGetlistmonkTemplateListmattermostChannelListmeweGroupListpinterestBoardListredditSubredditRequirementsGetredditSubredditSearchslackChannelListteamsChannelListtiktokCreatorInfoGetvkDestinationListwhopCompanyListwhopExperienceListwordpressCategoryListwordpressPostTypeListwordpressTagListwrapcastChannelSearchintegrationSchedulePostToolpostsListToolpostSettingsToolgenerateVideoOptionsvideoFunctionToolgenerateVideoToolgenerateImageTooluploadFromUrlTool
401

Bearer 認証情報が未指定、無効、または期限切れです。

errorobject必須
プロパティを表示
codestring必須
messagestring必須
retryableboolean必須
403

認証情報に必要な権限がありません。

errorobject必須
プロパティを表示
codestring必須
messagestring必須
retryableboolean必須
404

API または指定したツールを利用できません。

errorobject必須
プロパティを表示
codestring必須
messagestring必須
retryableboolean必須
413

リクエストがバイト数の上限を超えています。

errorobject必須
プロパティを表示
codestring必須
指定できる値:INVALID_INPUTFORBIDDENNOT_FOUNDCONFLICTFEATURE_DISABLEDCONFIRMATION_REQUIREDCONFIRMATION_INVALIDUPSTREAM_FAILEDNEEDS_REVIEWINTERNAL
messagestring必須
最小長: 1 · 最大長: 2048
retryableboolean必須
okboolean必須
toolNamestring必須
指定できる値:adAuditQuoteadAuditStartadAuditGetadAuditListsearchfetchprofileGetconnectionStatusGetaccountListwhatsappContactListwhatsappTemplateListwhatsappMediaListcampaignGetcampaignListcampaignDraftSavemediaListmediaImportmediaUploadCreatemediaUploadPartmediaUploadCompletemediaUploadGetmediaUploadAbortmediaGetcampaignReviewcampaignReviewGetcampaignReviewExecutecampaignScheduleBatchReviewcampaignScheduleBatchExecutescheduleListbrandContextGetinsightsAccountListinsightsPostListinsightsRefreshcampaignPlanGetcampaignPlanGenerateimageGenerationQuoteimageGenerationStartimageGenerationListintegrationListgroupListintegrationSchemadevtoOrganizationListdevtoTagListdiscordChannelListdiscourseCategoryListdiscourseTagListdiscourseTopicSearchdribbbleTeamListghostAuthorListghostNewsletterListghostTagListghostTierListhashnodePublicationListlemmyCommunitySearchlistmonkListsGetlistmonkTemplateListmattermostChannelListmeweGroupListpinterestBoardListredditSubredditRequirementsGetredditSubredditSearchslackChannelListteamsChannelListtiktokCreatorInfoGetvkDestinationListwhopCompanyListwhopExperienceListwordpressCategoryListwordpressPostTypeListwordpressTagListwrapcastChannelSearchintegrationSchedulePostToolpostsListToolpostSettingsToolgenerateVideoOptionsvideoFunctionToolgenerateVideoToolgenerateImageTooluploadFromUrlTool
429

リクエスト上限に達しました。再試行できます。

errorobject必須
プロパティを表示
codestring必須
messagestring必須
retryableboolean必須
503

API または処理を実行するサービスを利用できません。

errorobject必須
プロパティを表示
codestring必須
messagestring必須
retryableboolean必須
リクエスト
curl -X POST 'https://influence.so/api/v1/media/import' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'X-Publish-Confirmation: stringstringstringstringstringst' \
  -H 'Idempotency-Key: stringstringstri' \
  -H 'X-Publish-Upload: string' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/octet-stream' \
  -d 'string'
レスポンス
{
  "ok": true,
  "output": "string",
  "toolName": "adAuditQuote"
}