Shopee Open API v2 Client build with php

Overview

Shopee PHP Client

This is a Shopee PHP Client, currently supported for API V2 in ShopeeOpenPlatform

Composer Install

composer require haistar/shopee-php-sdk

Usage

$shopeeClient = new ShopApiClient();
$apiConfig = new ShopeeApiConfig();
$apiConfig->setPartnerId((int) $_ENV["SHOPEE_PARTNER_ID"]);
$apiConfig->setShopId((int) $_ENV["SHOPEE_SHOP_ID"]);
$apiConfig->setAccessToken($_ENV["SHOPEE_ACCESS_TOKEN"]);
$apiConfig->setSecretKey($_ENV["SHOPEE_SECRET_KEY"]);

$baseUrl = "https://partner.test-stable.shopeemobile.com";
$apiPath = "/api/v2/product/get_item_list";

$params = array();

$productList = $shopeeClient->httpCallGet($baseUrl, $apiPath, $params, $apiConfig);

Running Test

composer test

For running all tests

You might also like...
⚡️ Web3 PHP is a supercharged PHP API client that allows you to interact with a generic Ethereum RPC.
⚡️ Web3 PHP is a supercharged PHP API client that allows you to interact with a generic Ethereum RPC.

Web3 PHP is a supercharged PHP API client that allows you to interact with a generic Ethereum RPC. This project is a work-in-progress. Code and docume

A simple PHP GitHub API client, Object Oriented, tested and documented.

PHP GitHub API A simple Object Oriented wrapper for GitHub API, written with PHP. Uses GitHub API v3 & supports GitHub API v4. The object API (v3) is

A simple Object Oriented PHP Client for Termii SMS API

Termii Client A simple Object Oriented PHP Client for Termii SMS API. Uses Termii API. Requirements PHP = 7.2 Guzzlehttp ~6|~7 Installation Via Compo

Xendit REST API Client for PHP - Card, Virtual Account, Invoice, Disbursement, Recurring Payments, Payout, EWallet, Balance, Retail Outlets Services

Xendit REST API Client for PHP - Card, Virtual Account, Invoice, Disbursement, Recurring Payments, Payout, EWallet, Balance, Retail Outlets Services

php 8 client for the lemon.markets api

lemon.markets php client This repository contains a php 8+ compatible client for the https://lemon.markets API. The documentation of the API can be fo

PHP client for Microsoft Azure Face API.

Microsoft Azure Face API PHP client A PHP library that utilizes Azure Face REST API. Requirements PHP = 7.4 Installation composer require darmen/php-

Google PHP API Client Services

Google PHP API Client Services

PHP Client for the GoFlink API

GoFlink PHP API Client This project is an unofficial library to communicate with the GoFlink API from your PHP project. Documentation about the API is

A PHP client for the official Kizeo Forms API V3+. 📌

Kizeo Forms API V3+ - PHP This is a Swagger generated doc for Kizeo REST API 3. You can find additionnal documentation here : Online documentation. Th

Comments
  • Need guide to start

    Need guide to start

    Hi,

    Really appreciate for your sharing

    I've been trying to understand how this work for days, after setted .env with Dotenv, how can I get SHOPEE_ACCESS_TOKEN?

    Sorry, I've limited PHP knowledge, but I need to do this, as Shopee API v1 is going to turn off, I used to intergrade v1 in my system, but v2 has this token issue, still figuring it out.

    Thanks in advance for the help

    documentation 
    opened by Zhihaotan 3
  • Can't use the method `  makeGetMethod```  to generate tokens

    Can't use the method ` makeGetMethod``` to generate tokens

    Hi. Since there's a validation for $apiConfig->getAccessToken() == "" it's not possible to use that method to either generate the auth code or both refresh and access tokens.

    Is it possible to bypass that validation? Best regards.

    opened by CasperBraske 1
  • Return NULL / empty while trying to get

    Return NULL / empty while trying to get "download_shipping_document"

    Hi,

    Thanks again for your code sharing. I'm having difficult time to get result from v2.logistics.download_shipping_document , it always return empty, it there a way to get a file?

    Thanks

    opened by Zhihaotan 0
  • BUG - Bad Request when using GeneralWithBodyRequest

    BUG - Bad Request when using GeneralWithBodyRequest

    Bad Request when request with default Curl

    Below is some response example from request to this API /api/v2/auth/token/get "

    400 Bad Request

    400 Bad Request


    nginx
    " bug 
    opened by raviMukti 0
Releases(v3.1.0)
  • v3.1.0(Jun 23, 2022)

    What's Changed

    • Set Timout to 30s and Handle Exception by @raviMukti in https://github.com/raviMukti/shopee-api-client/pull/11

    Full Changelog: https://github.com/raviMukti/shopee-api-client/compare/v3.0.0...v3.1.0

    Source code(tar.gz)
    Source code(zip)
  • v3.0.0(Jun 9, 2022)

    ATTENTION

    Please note that this is a breaking changes, now we implemented the handle exception in the request layer, for those who use this library and using try-catch exception in the service exception, those code need to be changes

    What's Changed

    • Handle Exception and Breaking Changes by @raviMukti in https://github.com/raviMukti/shopee-api-client/pull/10

    Full Changelog: https://github.com/raviMukti/shopee-api-client/compare/v2.0.4...v3.0.0

    Source code(tar.gz)
    Source code(zip)
  • v2.0.4(Feb 18, 2022)

    What's Changed

    • Replace Curl with Guzzle by @raviMukti in https://github.com/raviMukti/shopee-api-client/pull/9

    Full Changelog: https://github.com/raviMukti/shopee-api-client/compare/v2.0.3...v2.0.4

    Source code(tar.gz)
    Source code(zip)
  • v2.0.3(Feb 14, 2022)

    What's Changed

    • Replace POST CURL Request with Guzzle by @raviMukti in https://github.com/raviMukti/shopee-api-client/pull/8

    Full Changelog: https://github.com/raviMukti/shopee-api-client/compare/v2.0.2...v2.0.3

    Source code(tar.gz)
    Source code(zip)
  • v2.0.2(Jan 12, 2022)

    What's Changed

    • Fix Response Post Method by @raviMukti in https://github.com/raviMukti/shopee-api-client/pull/6

    Full Changelog: https://github.com/raviMukti/shopee-api-client/compare/v2.0.1...v2.0.2

    Source code(tar.gz)
    Source code(zip)
  • v2.0.1(Sep 30, 2021)

  • v2.0.0(Sep 7, 2021)

  • v1.0.0(Aug 26, 2021)

Owner
ravimukti
hunger people
ravimukti
A2Reviews Client API lets you build apps, extensions or plugins to get reviews from the A2reviews APP

A2Reviews Client API lets you build apps, extensions or plugins to get reviews from the A2reviews APP. Including adding reviews to a store's products. It is used to import and export reviews through the API. This is the official package built and developed by A2Reviews, Inc.

Be Duc Tai 2 Sep 25, 2021
Where we build an open source API to retrieve some data about Togo's region

???? Subdivision administrative du Togo Base de données complète des régions, préfectures, communes, cantons et quartiers disponible au format JSON, S

Togo Developers 5 Jun 27, 2022
Google-api-php-client - A PHP client library for accessing Google APIs

Google APIs Client Library for PHP Reference Docs https://googleapis.github.io/google-api-php-client/main/ License Apache 2.0 The Google API Client Li

Google APIs 8.4k Dec 30, 2022
PHP JSON-RPC 2.0 Server/Client Implementation with Automatic Client Class Generation via SMD

PHP JSON-RPC 2.0 Server/Client Implementation with Automatic Client Class Generation via SMD

Sergey Bykov 63 Feb 14, 2022
Nexmo REST API client for PHP. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.

Client Library for PHP Support Notice This library and it's associated packages, nexmo/client and nexmo/client-core have transitioned into a "Maintena

Nexmo 75 Sep 23, 2022
DigitalOcean API v2 client for Symfony and API Platform

DigitalOcean Bundle for Symfony and API Platform DunglasDigitalOceanBundle allows using the DigitalOcean API from your Symfony and API Platform projec

Kévin Dunglas 25 Jul 27, 2022
API client for ThePay - payment gate API

This is the official highly compatible public package of The Pay SDK which interacts with The Pay's REST API. To get started see examples below.

ThePay.cz s.r.o. 3 Oct 27, 2022
Code Quiz MonoRepo (API, API Client, App)

Code Quiz Welcome to the Code Quiz Open Source project from How To Code Well. This is an Open Source project that includes an API and an App for the d

How To Code Well 2 Nov 20, 2022
🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.

Telegram Bot API - PHP SDK Telegram Bot PHP SDK lets you develop Telegram Bots in PHP easily! Supports Laravel out of the box. Telegram Bot API is an

Irfaq Syed 2.5k Jan 6, 2023
This package help you build your REST API documentation.

Laravel API Doc This package help you build your REST API documentation. Installation You can install the package via composer: composer require axeld

Axel 2 May 19, 2022