IgResponseError: POST /api/v1/direct_v2/threads/broadcast/link/ - 403 Forbidden;
See original GitHub issueBug 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:
- Created 3 years ago
- Comments:5
Top GitHub Comments
This will be possible if #1334 is merged. But fow now you can use this:
You can leave out the
as any
if you’re not using Typescript.@davidesantangelo did you solve it and how?