Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

fix(instagram): url-encode collaborators param

Gilad Resisi0a8c28fbd9a5
diff --git a/libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts b/libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts
index 2cbc2bfb8..134dc43c4 100644
--- a/libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts
+++ b/libraries/nestjs-libraries/src/integrations/social/instagram.provider.ts
@@ -666,8 +666,10 @@ export class InstagramProvider
const isStory = firstPost.settings.post_type === 'story';
const collaborators =
firstPost?.settings?.collaborators?.length && !isStory
- ? `&collaborators=${JSON.stringify(
- firstPost?.settings?.collaborators.map((p) => p.label)
+ ? `&collaborators=${encodeURIComponent(
+ JSON.stringify(
+ firstPost?.settings?.collaborators.map((p) => p.label)
+ )
)}`
: ``;
const isTrialReel = this.assetBoolean(firstPost.settings.is_trial_reel);
@@ -912,7 +914,9 @@ export class InstagramProvider
pendingData.containers.join(',')
)}${
pendingData.collaborators?.length
- ? `&collaborators=${JSON.stringify(pendingData.collaborators)}`
+ ? `&collaborators=${encodeURIComponent(
+ JSON.stringify(pendingData.collaborators)
+ )}`
: ``
}&access_token=${accessToken}`,
{