diff --git a/docs/user/api-key.md b/docs/user/api-key.md new file mode 100644 index 000000000..a71e4e7bc --- /dev/null +++ b/docs/user/api-key.md @@ -0,0 +1,21 @@ +--- +title: Api Key +description: Access api with api key +keywords: [user, api key, accessKey, accessSecret] +authors: [DacongDA] +--- + +## Access api with api key + +You can access casdoor api with accessKey and accessSecret of user. + +1. Create a pair of accessKey and accessSecret in account setting page. +2. Put accessKey and accessSercet in into the http query param. + +## Example + +![User Api Key](/img/user/user_api_key.png) + +```bash +curl --location 'http://door.casdoor.com/api/user?accessKey=b86db9dc-6bd7-4997-935c-af480dd2c796&accessSecret=79911517-fc36-4093-b115-65a9741f6b14' +``` diff --git a/sidebars.js b/sidebars.js index a4a19971a..5d28a39d2 100644 --- a/sidebars.js +++ b/sidebars.js @@ -332,6 +332,7 @@ module.exports = { "user/multi-factor-authentication", "user/roles", "user/permissions", + "user/api-key", ], }, { diff --git a/static/img/user/user_api_key.png b/static/img/user/user_api_key.png new file mode 100644 index 000000000..65e449220 Binary files /dev/null and b/static/img/user/user_api_key.png differ