Catalog npm
Back to packageRELEASE DETAILS

0.1.0

npm

1688-open-sdk

1688开放平台node sdk,因官方没有提供node版本sdk,因此提供非官方版,希望对大家有用,欢迎issue和pr。

16881688开放平台
Published8 Aug 2025
Direct dependencies6
Transitive dependenciesNot calculated

README

Current package documentation

1688-open-sdk

1688开放平台node sdk,因官方没有提供node版本sdk,因此提供非官方版,希望对大家有用,欢迎issue和pr。

1688开放平台

安装

使用npm:

npm i 1688-open-sdk -S

或者yarn:

yarn add 1688-open-sdk

引入文件

import ApiExecutor from "1688-open-sdk"

或者

const ApiExecutor = require("1688-open-sdk")

配置

使用1688开放平台的appkey,appsecret进行初始化:

const apiExecutor = new ApiExecutor(process.env.APPKEY, process.env.APPSECRET)

API

使用 code 换取 refreshToken
const { refresh_token } = await apiExecutor.code2RefreshToken(code, redirect_uri)
使用refreshToken更新AccessToken
const { access_token } = await apiExecutor.refreshToken2AccessToken(refresh_token)

例如 跨境产品以图搜图:

apiExecutor.execute(
    'com.alibaba.linkplus/alibaba.cross.similar.offer.search',
    {
        picUrl:'https://img.alicdn.com/imgextra/i1/O1CN01PwAoB21LuSuZE9Oqx_!!6000000001359-2-tps-1170-597.png',
        page: 1
    },
    access_token
)

注意调用api返回的都是promise,因此可使用async/await。

授权地址

https://auth.1688.com/oauth/authorize?client_id=appKey&site=1688&redirect_uri=http://www.baidu.com/&state=1

授权成功后会跳转到你设置的redirect_uri地址,并附带code和state参数。

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 6

Native requirements
6 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
axios
Environment
{
  "local_name": "axios",
  "alias": false,
  "peer_metadata": null
}
^1.11.0runtime
vitest
Environment
{
  "local_name": "vitest",
  "alias": false,
  "peer_metadata": null
}
^3.2.4development
prettier
Environment
{
  "local_name": "prettier",
  "alias": false,
  "peer_metadata": null
}
^3.6.2development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^5.9.2development
@rslib/core
Environment
{
  "local_name": "@rslib/core",
  "alias": false,
  "peer_metadata": null
}
^0.11.2development
@types/node
Environment
{
  "local_name": "@types/node",
  "alias": false,
  "peer_metadata": null
}
^22.17.0development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "05ebff699897041dec54da1fc008a4924385728c",
  "tarball": "https://registry.npmjs.org/1688-open-sdk/-/1688-open-sdk-0.1.0.tgz",
  "fileCount": 6,
  "integrity": "sha512-hNMZ/jktuFoK9Bai5haTqqMJXXTTxwP8TIWAPHG7xOFA0H7SFaOE1ayb3QKMWiki3NnfW8OGfy4TW0sC0FXoeg==",
  "signatures": [
    {
      "sig": "MEUCIQDDDBw37oFppl5pR1HGfUpZ5hqADVokO/8u9J+QTW37+AIgUAPBzMj+uuVLTMYkOajILpcFn+Y0hhfHOeaUYQwo49I=",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "unpackedSize": 7122
}

Repository

PENDING
sellerartifact/1688-open-sdk-v2

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:17 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:05195dfd9afa4da17ae7b60a8d2e88541aa7cbe104fd8124e10f0c1e4c059a3d

Other collected versions

0.1.39 Aug0.1.28 Aug0.1.110 Jun0.0.910 Jun0.0.810 Jun0.0.710 JunView all collected versions →