Authentication
API Authentication and Authorization.
Most requests to the chpter. APIs must be authenticated using API keys. This keys are Public Key and Secret Key which are associated to your chpter. account.
You can view and manage your API keys in the chpter Dashboard .
Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
Here is an example header to get you started.
```javascript
headers: {
'Content-Type': 'application/json',
'Api-Key': 'pk_*********************************'
},
```
API requests without authentication will also fail. If you do not include your key when making an API request or use one that is incorrect, chpter. will return an error.
```json
{
"message": "unauthorized",
"success": false,
"status": 401
}
```
Last updated