tiktok-scraper-php icon indicating copy to clipboard operation
tiktok-scraper-php copied to clipboard

Invalid response

Open dunkukoder opened this issue 5 years ago • 21 comments

Request body returns empty. Maybe something changed?

Error code: Fatal error: Uncaught sabri\tiktok\exceptions\InvalidResponseException: Invalid response in tiktok-scraper-php-master\src\TiktokApi.php:83

dunkukoder avatar Oct 24 '19 12:10 dunkukoder

Please provide me some more details about your code.

snuzi avatar Oct 24 '19 13:10 snuzi

example/demo.php <?php

require __DIR__ . '/../vendor/autoload.php'; (Dotenv\Dotenv::create(__DIR__ . '/../'))->load();

use sabri\tiktok\TiktokApi;

$client = new TiktokApi([ 'device_id' => getenv('DEVICE_ID'), 'iid' => getenv('IID'), 'openudid' => getenv('OPENUDID') ]);

$uid = 'realmadrid'; $user = $client->searchUser($uid);

var_dump($user);

And .env file #tiktok device variables DEVICE_ID=6749689776159213061 IID=6749690177411008261 OPENUDID=c04a0021ec1f4988 thanks for attention

dunkukoder avatar Oct 24 '19 13:10 dunkukoder

Thank you for details, it looks like there are changes from Tiktok. This needs some investigations. I will let you know as soon as I have some news.

snuzi avatar Oct 24 '19 18:10 snuzi

Ok. I am waiting. I tried to create same request with mitm proxy. But it doesnt work.

dunkukoder avatar Oct 24 '19 19:10 dunkukoder

Hi, i am using this library in my codeigniter project. But i am not getting any thing. And i am also confused about the device_id, iid, and openudid. What are these variables.?? Here is the code

<?php

	require __DIR__ . '/../vendor/autoload.php';
	(Dotenv\Dotenv::create(__DIR__ . '/../'))->load();

	use sabri\tiktok\TiktokApi;

	$client = new TiktokApi([
		'device_id' => getenv('295BA56C25276BDB'),
		'iid' => getenv('IID'),
		'openudid' => getenv('OPENUDID')
	]);

	$uid = '@joshgancas';
	$user = $client->getUser($uid);

	var_dump($user);

Tayyab985 avatar Nov 04 '19 20:11 Tayyab985

@Tayyab985 recently there have been some changes done by Tiktok in their Rest API which I need do find out. device_id, iid, openudid are some extra parameters in your mobile device which Tiktok app uses when communicating with Rest API. You can find these parameters by inspecting Tiktok app http requests using some proxy applications.

snuzi avatar Nov 06 '19 09:11 snuzi

@snuzi any updates?

reteps avatar Nov 26 '19 00:11 reteps

any updates?

dombrocarl avatar Nov 28 '19 18:11 dombrocarl

any update ?

umeshdepale avatar Dec 07 '19 10:12 umeshdepale

any update?

design365 avatar Dec 19 '19 09:12 design365

@snuzi any update?

design365 avatar Dec 19 '19 09:12 design365

Any Update @snuzi

creativehassan avatar Jan 31 '20 21:01 creativehassan

@snuzi Any update?

rohailparacha avatar Feb 11 '20 13:02 rohailparacha

@rohailparacha @creativehassan @design365 Guys that repo works really good https://github.com/drawrowfly/tiktok-scraper

bobmarley29 avatar Feb 21 '20 13:02 bobmarley29

@Tayyab985 recently there have been some changes done by Tiktok in their Rest API which I need do find out. device_id, iid, openudid are some extra parameters in your mobile device which Tiktok app uses when communicating with Rest API. You can find these parameters by inspecting Tiktok app http requests using some proxy applications.

Could you please some proxy application where I could find it.?

muhammadyahyaa avatar Mar 24 '20 12:03 muhammadyahyaa

Have you fixed the issue of no response ?

kliptu avatar Apr 12 '20 09:04 kliptu

@rohailparacha @creativehassan @design365 Guys that repo works really good https://github.com/drawrowfly/tiktok-scraper

Do you have example in PHP ?

kliptu avatar Apr 12 '20 09:04 kliptu

@snuzi Any update?

ov4pek avatar Apr 14 '20 13:04 ov4pek

@dunkukoder

And .env file #tiktok device variables DEVICE_ID=6749689776159213061 IID=6749690177411008261 OPENUDID=c04a0021ec1f4988 thanks for attention

Where i need to get the DEVICE_ID={device_id} IID={iid}} OPENUDID={openudid}}?

TheTrendingNet avatar May 03 '20 20:05 TheTrendingNet

@snuzi any update about invalid response?

haqnawazwgbm avatar Aug 05 '20 10:08 haqnawazwgbm

not working for me. after hours of relentless googling I had to use https://rapidapi.com/neotank/api/tiktok-bulletproof for now (luckily I just needed profile information requests)

skmachine avatar Jun 25 '22 19:06 skmachine