bigcommerce-token-validator 1.0.6
Install from the command line:
Learn more about npm packages
$ npm install @grant-unwin/bigcommerce-token-validator@1.0.6
Install via package.json:
"@grant-unwin/bigcommerce-token-validator": "1.0.6"
About this version
This tool is designed to help you audit your BigCommerce store's token permissions. It will generate a report that shows which endpoints are accessible with the token you provide.
You can use this tool to determine which permissions are carried by your token, and which permissions are missing. This can be useful when you are trying to determine why a particular API call is failing.
Run npm install @grant-unwin/bigcommerce-token-validator
to install the package.
Then, import the DoAudit
function and pass it your credentials and the permissions you want to test.
import { DoAudit, BigCommercePermission } from '@grant-unwin/bigcommerce-token-validator';
const creds = {
clientId: '',
accessToken: '',
storeHash: '',
};
const results = await DoAudit(creds, [
BigCommercePermission.All,
]);
console.log(results);
Results
[
{
"message": "{\"status\":403,\"title\":\"You don't have a required scope to access the endpoint\",\"type\":\"https://developer.bigcommerce.com/api-docs/getting-started/api-status-codes\",\"errors\":{}}",
"permission": "store_v2_customers",
"result": false,
"status": 403,
},
{
"message": undefined,
"permission": "store_v2_customers_read_only",
"result": true,
"status": 200,
},
{
"message": undefined,
"permission": "store_v2_information_read_only",
"result": true,
"status": 200,
},
...
]
Details
- bigcommerce-token-validator
-
grant-unwin
- over 2 years ago
- ISC
- 7 dependencies
Assets
- bigcommerce-token-validator-1.0.6.tgz
Download activity
- Total downloads 0
- Last 30 days 0
- Last week 0
- Today 0