threads-api icon indicating copy to clipboard operation
threads-api copied to clipboard

Axios 404 Error when Attempting to Publish

Open BradyRyun opened this issue 1 year ago • 2 comments

Version: 1.6.3

I am able to run the login with the same user credentials. I get back a token, but NO user ID. When I run getUserIDFromUsername(username) I do receive a user ID back. What could be wrong here?

AxiosError: Request failed with status code 404

  const client = new ThreadsAPI({
    username: user.instagram_username,
    password: user.instagram_password
  })
  console.log(content)
  try {
    const result = await client.publish({
      text: content
    })
catch(e) {
   console.log(e)
}
headers: AxiosHeaders {
  Accept: 'application/json, text/plain, */*',
  'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
  'User-Agent': 'Barcelona 291.0.0.31.111 Android',
  Authorization: 'Bearer IGT:2:<redacted>',
  'Content-Length': '510',
  'Accept-Encoding': 'gzip, compress, deflate, br'
},
method: 'post',
url: 'https://i.instagram.com/api/v1/media/configure_text_only_post/',

I have verified that username and password are being passed properly to client initialization.

BradyRyun avatar Jul 28 '23 11:07 BradyRyun

I actually have the same problem. Is it because they changed the API ? @junhoyeo

pmessineo avatar Aug 01 '23 16:08 pmessineo

The same!

tiagobbraga avatar Aug 29 '23 20:08 tiagobbraga