question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IgResponseError: POST /api/v1/direct_v2/threads/broadcast/link/ - 403 Forbidden;

See original GitHub issue

Bug Report

Read the Notes and fill out the form.

Notes

Your issue will be closed if you violate any rule below.

  • You need to include a meaningful section of your code (not your entire project and not a single line).
  • Please do not add screenshots as they’re not easy to work with.
  • Errors like IgActionSpamError (feedback_required), IgCheckpointError (challenge_required), checkpont_required, login_required are “common” and there are multiple issues, search here.
  • You can delete this section after reading it.

Form

Put an [x] if you meet the condition, else leave [ ].

Requirements

  • I’ve searched the Issues
  • I’ve read the basic concepts
  • I’m using the latest version
  • I’ve debugged my code using the DEBUG variable.

Platform

  • I’m using Node.js version YOUR_VERSION (node -v)
  • I’m using electron
  • I’m using the browser YOUR_BROWSER_AND_VERSION
  • I’m using some other environment YOUR_ENV

Description

A specific description of your bug, so it’s understandable to anyone. If you have pictures or videos to upload, please add a link like this: [title](url).

YOUR DESCRIPTION HERE

Code

Add a meaningful section of your code here. If you are using TypeScript replace js with typescript.

/* tslint:disable:no-console */
import { DirectThreadEntity, IgApiClient } from '../src';

const ig = new IgApiClient();

async function login() {
  // basic login-procedure
  ig.state.generateDevice(process.env.IG_USERNAME);
  ig.state.proxyUrl = process.env.IG_PROXY;
  await ig.account.login(process.env.IG_USERNAME, process.env.IG_PASSWORD);
}

async function sendMessageLink(thread: DirectThreadEntity, message: string, links: string[]) {
  return await thread.broadcastLink(message, links);
}

(async () => {
  await login();

  const thread = ig.entity.directThread(process.env.IG_THREAD_ID);

  await sendMessageLink(thread, process.env.IG_MESSAGE, [process.env.IG_MESSAGE_LINK]);
})();

Error and Output

/Users/davidesantangelo/Work/chorally/apis/instagram-private-api/dist/src/core/request.js:126 return new errors_1.IgResponseError(response); ^

IgResponseError: POST /api/v1/direct_v2/threads/broadcast/link/ - 403 Forbidden; at Request.handleResponseError (/Users/davidesantangelo/Work/chorally/apis/instagram-private-api/dist/src/core/request.js:126:16) at Request.send (/Users/davidesantangelo/Work/chorally/apis/instagram-private-api/dist/src/core/request.js:54:28) at async DirectThreadRepository.broadcast (/Users/davidesantangelo/Work/chorally/apis/instagram-private-api/dist/src/repositories/direct-thread.repository.js:177:26) at async DirectThreadEntity.broadcast (/Users/davidesantangelo/Work/chorally/apis/instagram-private-api/dist/src/entities/direct-thread.entity.js:192:26) at async DirectThreadEntity.broadcastLink (/Users/davidesantangelo/Work/chorally/apis/instagram-private-api/dist/src/entities/direct-thread.entity.js:70:16) at async sendMessage (/Users/davidesantangelo/Work/chorally/apis/instagram-private-api/dist/engine/send_text.js:11:12) at async /Users/davidesantangelo/Work/chorally/apis/instagram-private-api/dist/engine/send_text.js:16:5

YOUR WELL FORMATTED ERROR
YOUR OUTPUT GOES HERE

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Nerixyzcommented, Dec 28, 2020

This will be possible if #1334 is merged. But fow now you can use this:

const sendText = (entity: DirectThreadEntity, test: string) => (entity as any).broadcast({
  item: 'text',
  form: {
    text,
  },
});

You can leave out the as any if you’re not using Typescript.

0reactions
avalanche1commented, Nov 20, 2021

@davidesantangelo did you solve it and how?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I troubleshoot HTTP 403 errors from API Gateway?
An HTTP 403 response code means that a client is forbidden from accessing a valid URL. The server understands the request, ...
Read more >
403 Forbidden error: What it is and how to fix it
A 403 error is an HTTP status code that means “access denied.” If you ever had a treehouse as a kid, you may...
Read more >
403 Forbidden - HTTP - MDN Web Docs - Mozilla
The HTTP 403 Forbidden response status code indicates that the server understands the request but refuses to authorize it.
Read more >
What Is the 403 Forbidden Error and How to Fix It (8 ...
Can't access a website due to the 403 Forbidden error? Read this tutorial and learn 8 methods ... This might happen after you've...
Read more >
403 error in Google Indexing API (after trying all solutions ...
Fist thing to do is to figure out which Forbiden error you are getting. I would like for you to try to get...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found