Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of TikTok responses' status codes anywhere? #403

Open
Incher25 opened this issue Dec 2, 2020 · 32 comments
Open

List of TikTok responses' status codes anywhere? #403

Incher25 opened this issue Dec 2, 2020 · 32 comments
Labels
information collecting Collecting information on TikTok

Comments

@Incher25
Copy link

Incher25 commented Dec 2, 2020

Hi all,

Does anyone know is there a list of TikTok responses' status codes with their meanings?
Thanks in advance!

@ranahaani
Copy link

Responses are grouped in five classes:

  • Informational responses (100–199)
  • Successful responses (200–299)
  • Redirects (300–399)
  • Client errors (400–499)
  • Server errors (500–599)

Successful responses

  1. 200 OK
  2. 201 Created
  3. 202 Accepted
  4. 203 Non-Authoritative Information
  5. 204 No Content
  6. 205 Reset Content
  7. 206 Partial Content

@davidteather
Copy link
Owner

I feel like I ran into a site that showed them all awhile ago, but can't seem to find it now :\

200 - good request

10201 - invalid entity
10221 - invalid profile

10000 - captcha is shown but the json response is formatted differently it's handled by the API as of the moment. Structure is {'code': 10000} and has a few other datapoints after that

@davidteather davidteather added the information collecting Collecting information on TikTok label Dec 3, 2020
@davidteather davidteather changed the title Question: is there a list of TikTok responses' status codes anywhere? List of TikTok responses' status codes anywhere? Dec 3, 2020
@Incher25
Copy link
Author

Incher25 commented Dec 3, 2020

I feel like I ran into a site that showed them all awhile ago, but can't seem to find it now :\

200 - good request

10201 - invalid entity
10221 - invalid profile

10000 - captcha is shown but the json response is formatted differently it's handled by the API as of the moment. Structure is {'code': 10000} and has a few other datapoints after that

@davidteather thanks for your reply! Do you know what 10215 and 10216 mean?

@nuqz
Copy link

nuqz commented Dec 21, 2020

I have small addition to codes above:

00000 - or just (0) seems like the same as status 200
10201 - invalid entity or invalid parameter, like when count is higher than 50 in item_list request.
10202 - Page not found (something like 404 HTTP status code)

@Bengejd
Copy link

Bengejd commented Jan 2, 2021

Really small addition:

10102 - "not login", which leads me to believe that you need an active session to use the call (logged in).

@eladmeidar
Copy link

There's also 10204 which seems to be kind of a block.

@Incher25
Copy link
Author

Incher25 commented Jun 17, 2021

10215 and 10217 - video is currently unavailable
10216 - video is private

@adiantek
Copy link
Contributor

adiantek commented Nov 17, 2021

You need only to handle statusCode from props->pageProps->statusCode.
From TikTok.commons.js:

{
  "0": "OK",
  "450": "CLIENT_PAGE_ERROR",
  "10000": "VERIFY_CODE",
  "10101": "SERVER_ERROR_NOT_500",
  "10102": "USER_NOT_LOGIN",
  "10111": "NET_ERROR",
  "10113": "SHARK_SLIDE",
  "10114": "SHARK_BLOCK",
  "10119": "LIVE_NEED_LOGIN",
  "10202": "USER_NOT_EXIST",
  "10203": "MUSIC_NOT_EXIST",
  "10204": "VIDEO_NOT_EXIST",
  "10205": "HASHTAG_NOT_EXIST",
  "10208": "EFFECT_NOT_EXIST",
  "10209": "HASHTAG_BLACK_LIST",
  "10210": "LIVE_NOT_EXIST",
  "10211": "HASHTAG_SENSITIVITY_WORD",
  "10212": "HASHTAG_UNSHELVE",
  "10213": "VIDEO_LOW_AGE_M",
  "10214": "VIDEO_LOW_AGE_T",
  "10215": "VIDEO_ABNORMAL",
  "10216": "VIDEO_PRIVATE_BY_USER",
  "10217": "VIDEO_FIRST_REVIEW_UNSHELVE",
  "10218": "MUSIC_UNSHELVE",
  "10219": "MUSIC_NO_COPYRIGHT",
  "10220": "VIDEO_UNSHELVE_BY_MUSIC",
  "10221": "USER_BAN",
  "10222": "USER_PRIVATE",
  "10223": "USER_FTC",
  "10224": "GAME_NOT_EXIST",
  "10225": "USER_UNIQUE_SENSITIVITY",
  "10227": "VIDEO_NEED_RECHECK",
  "10228": "VIDEO_RISK",
  "10229": "VIDEO_R_MASK",
  "10230": "VIDEO_RISK_MASK",
  "10231": "VIDEO_GEOFENCE_BLOCK",
  "10404": "FYP_VIDEO_LIST_LIMIT",
  "undefined": "MEDIA_ERROR"
}

MEDIA_ERROR can be splitter to:

{
  "1": "MEDIA_ERR_ABORTED",
  "2": "MEDIA_ERR_NETWORK",
  "3": "MEDIA_ERR_DECODE",
  "4": "MEDIA_ERR_SRC_NOT_SUPPORTED",
  "MEDIA_ERR_ABORTED": 1,
  "MEDIA_ERR_NETWORK": 2,
  "MEDIA_ERR_DECODE": 3,
  "MEDIA_ERR_SRC_NOT_SUPPORTED": 4
}

Media error can be only if XMLHttpRequest fails. 10201 is handled by captcha.js and/or webmssdk_ov_362, so it's not in this list.
PS. I'm not sure if it is the complete list, this list seems unused in JS for me, bcuz they are sending in HTML sometimes error.

@flintishere
Copy link

Tiktok has updated their api. All users even invalid, banned, existing, nonexisting, give the same status code - 200.

@adiantek
Copy link
Contributor

adiantek commented Dec 18, 2021

Tiktok has updated their api. All users even invalid, banned, existing, nonexisting, give the same status code - 200.

I don't see any update. Sent invalid request (count=300 instead of count=30 maximum to https://m.tiktok.com/api/post/item_list/) and got:

{"statusCode":10201,"statusMsg":""}

In HTTP, https://tiktok.com/@xyz has in __NEXT_DATA__:

{
  "props": {
    "initialProps": {
      ...
    },
    "pageProps": {
      "serverCode": 404,
      "uniqueId": "xyz",
      "statusCode": 10221,
      "statusMsg": "",
      "userInfo": {},
      "seoProps": {},
      "feedConfig": null,
      "isSSR": true,
      "pageOptions": {
        "footer": {
          "hidden": true,
          "showDownload": false
        },
        "header": {
          "showUpload": true,
          "type": "webapp"
        }
      },
      "items": [],
      "videoListHasMore": true,
      "videoListMaxCursor": 0,
      "videoListMinCursor": 0,
      "videoListStatusCode": 0
    },
    "pathname": "/share/user",
    "loadInit": false
  },
  ...
}

Didn't test with sigi-persisted-data. Maybe sigi has updated error codes.

@flintishere
Copy link

When using requests.get('tiktok.com/@xyz') and then printing the status code it comes back as 200, same with available and unavailable usernames. Is there a way I can get the status code to show the actual codes in the website?

@flintishere
Copy link

Like how would I retrieve this in python?

{"statusCode":10201,"statusMsg":""}

In HTTP, https://tiktok.com/@xyz has in __NEXT_DATA__:

Requests.head comes back as 301, due to tiktok redirecting before showing the codes.

@adiantek
Copy link
Contributor

@flintishere tiktok statusCode != http statusCode. If you implement API by-own, you must extract JSON from HTTP request:
https://github.com/davidteather/TikTok-Api/blob/master/TikTokApi/tiktok.py#L1550
and statusCode is in JSON in props->pageProps->statusCode.

@flintishere
Copy link

How can I do this using TikTokApi? I have it installed but never got around to learning how to do anything with it.

@flintishere
Copy link

Also, would it be possible to extcract the JSON via requests?

@pavelvyrlan
Copy link

Did anyone face 10404 (FYP_VIDEO_LIST_LIMIT) StatusCode? I tried several proxies for different video IDs in "get_recommended_tiktoks_by_video_id" method but every time got 10404 StatusCode

@akasaa101
Copy link

Did anyone know 10013 status code means?

@666skid
Copy link

666skid commented Mar 5, 2022

Tiktok has updated their api. All users even invalid, banned, existing, nonexisting, give the same status code - 200.

have you found a solution? im trying to make a username checker that doesnt output banned accounts and this is killing me.

@flintishere
Copy link

flintishere commented Mar 5, 2022 via email

@666skid
Copy link

666skid commented Mar 5, 2022

lol brook#0010

On Fri, Mar 4, 2022, 8:39 PM 666skid @.> wrote: Tiktok has updated their api. All users even invalid, banned, existing, nonexisting, give the same status code - 200. have you found a solution? im trying to make a username checker that doesnt output banned accounts and this is killing me. — Reply to this email directly, view it on GitHub <#403 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASTPDD7X4K6EL6EBRCUITMLU6K3OHANCNFSM4UJYTSRA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.>

i believe that brook stopped making checkers, and the checkers that he made all got leaked and has the trash api

@flintishere
Copy link

flintishere commented Mar 5, 2022 via email

@666skid
Copy link

666skid commented Mar 5, 2022

I am brook 😱😜

help me get new api then dad >.<

@flintishere
Copy link

flintishere commented Mar 5, 2022 via email

@666skid
Copy link

666skid commented Mar 6, 2022

text me on discord

whats is your discord

@flintishere
Copy link

flintishere commented Mar 6, 2022 via email

@666skid
Copy link

666skid commented Mar 6, 2022

brook#0010

u not brook stop capping LOL add me sen#0666

@adiantek
Copy link
Contributor

There's also 10204 which seems to be kind of a block.

It's CR (country restriction), but I can't confirm it's ONLY CR. I used Russian VPN and everything from the west is blocked (status code 10204).

@varuntribe
Copy link

Does anyone know what 10016 is for?

@kalemi19
Copy link

Looking for the 10016 error code meaning as well.

@lonardonifabio
Copy link

lonardonifabio commented Feb 14, 2023

Hello,

Just sometimes (not everytime) I receive this error to upload automatically video on my tik tok profile, but I'm not sure what is the reason:

[-] An error occured while reaching https://www.tiktok.com/api/v1/item/create/
r = <Response [200]>
r.content = b'{"log_pb":{"impr_id":"2023021410310029346A91667A3C2C8DB9"},"status_code":5,"status_msg":"Invalid parameters"}'

is there someone who can help me?

@jamesli1997
Copy link

What's error code 100001?

@oxuss
Copy link

oxuss commented Sep 4, 2023

Hello,

Just sometimes (not everytime) I receive this error to upload automatically video on my tik tok profile, but I'm not sure what is the reason:

[-] An error occured while reaching https://www.tiktok.com/api/v1/item/create/ r = <Response [200]> r.content = b'{"log_pb":{"impr_id":"2023021410310029346A91667A3C2C8DB9"},"status_code":5,"status_msg":"Invalid parameters"}'

is there someone who can help me?

I'm having the same issue. Anyone found a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
information collecting Collecting information on TikTok
Projects
None yet
Development

No branches or pull requests