Comments (6)
in new api, they no longer used base64 for uploaded file, I'll patch it soon
from tiktokshop-php.
No worries, figure it out - I have added the code below, may help someone :)
$resp = $client->Product->createProduct([
'title' => 'This product title',
'description' => "this is description",
'category_id' => '809608',
'main_images' => [[ 'uri'=>'tos-useast2a-i-tulkllf4y5-euttp/ca3dfdfff47adc4c41adc5a8080147dd39']],
'skus' => [[
'seller_sku' => 'SKU-PRO-TEST',
'inventory' => [[
'warehouse_id'=>'7292840624437780256',
'quantity'=> (int)99,
]],
'price' => [
'amount'=>'18.99',
'currency'=>'GBP',
],
]],
'package_weight' => [
'value'=>(string)0.750,
'unit' => 'KILOGRAM',
],
'package_dimensions' => [
'length' => (string)45,
'width' => (string)35,
'height' => (string)16,
'unit' => 'CENTIMETER',
],
]);
from tiktokshop-php.
$response = $client->Product->searchProducts($params = [], $page_size = 100, $page_token);
I did some mistake in previous version, please try this
$client->Product->searchProducts([
'page_size' => 100,
'page_token' => 'xxxxxxx'
], [
'status' => 'ALL'
]);
or combine it in first param, plugin will extract it automatic
$client->Product->searchProducts([
'page_size' => 100,
'page_token' => 'xxxxxxx',
'status' => 'ALL',
]);
by this change, if tiktok added more query param in future, we don't need to change anything
from tiktokshop-php.
Perfect, thanks worked - Now when i using the URI code into create product, i am getting below error -
[*message] => param body.main_images type invalid,actual type is:map[string]interface {},expected type is:list
In array -
[main_images] => Array(
[uri] => tos-useast2a-i-tulkllf4y5-euttp/ca329ff47adc4c41adc5a8080147dd39
)......
from tiktokshop-php.
Thanks for fixing the issue for upload image but now same error showing on products/search - unsupported Media Type
It was working before - products/search
$response = $client->Product->searchProducts($params = [], $page_size = 100, $page_token);
EcomPHP\TiktokShop\Resource
[args] => Array
(
[0] => POST
[1] => products/search
[2] => Array
(
[query] => Array
(
)
[form_params] => 100
)
)
)
from tiktokshop-php.
it worked.
Thanks again for your help.
from tiktokshop-php.
Related Issues (13)
- Get Authorization Duration HOT 2
- Validation upload image with SplFileInfo HOT 17
- Fatal error: Uncaught Error: Class 'EcomPHP\TiktokShop\Auth' not found HOT 3
- param create_time_ge type invalid,actual type is:string,expected type is:int64 HOT 4
- Create product api HOT 1
- Fulfillment.php - markPackageAsShipped HOT 4
- updateShopWebhook HOT 3
- "JSON Parsing Error Using $auth->getToken()" HOT 1
- detail:shop_id is invalid HOT 3
- Cannot install on other projects which require guzzle 6.x HOT 2
- Create product with parameter error HOT 2
- getBrand HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tiktokshop-php.