English
English
Appearance
English
English
Appearance
/public/account/shopee/connectCompletes the Shopee connection using the code and shop_id received from the OAuth redirect. On success, returns the new account ID.
Authorization: Basic Base64(AccessKey:SecretKey))| Field | Type | Required | Description |
|---|---|---|---|
code | string | Yes | The code and shop_id from the Shopee redirect, joined with an underscore: {code}_{shop_id}. |
curl -X POST "https://api.repliz.com/public/account/shopee/connect" \
-H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)" \
-H "Content-Type: application/json" \
-d '{"code":"AUTH_CODE_SHOP_ID"}'import axios from 'axios';
const response = await axios.post(
'https://api.repliz.com/public/account/shopee/connect',
{
code: 'AUTH_CODE_SHOP_ID',
},
{
auth: {
username: 'YOUR_ACCESS_KEY',
password: 'YOUR_SECRET_KEY',
},
},
);
console.log(response.data);const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');
const response = await fetch(
'https://api.repliz.com/public/account/shopee/connect',
{
method: 'POST',
headers: {
Authorization: `Basic ${credentials}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
code: 'AUTH_CODE_SHOP_ID',
}),
},
);
const data = await response.json();
console.log(data);{
"accountId": "69e97477a795504e0786cec6"
}{
"code": 401,
"message": "unauthorized"
}