Keys
Each instance of MeiliSearch has three keys: a master, a private, and a public. Each key has a given set of permissions on the API routes.
You must have the master key to access the keys
route.
More information about the keys and their rights.
Get keys
GET
/keys
Get the private and public key.
WARNING
You must have the master key to access this route.
Example
<>
cURL
JS
Python
PHP
Java
Ruby
Go
Rust
Swift
Dart
curl \
-H "X-Meili-API-Key: 123" \
-X GET 'http://localhost:7700/keys'
client.getKeys()
client.get_keys()
$client->getKeys();
//Not yet implemented
client.keys
client.GetKeys()
let keys: Keys = client.get_keys().await.unwrap();
client.keys { (result: Result<Key, Swift.Error>) in
switch result {
case .success(let key):
print(key)
case .failure(let error):
print(error)
}
}
await client.getKeys();
Response: 200 Ok
{
"private": "8c222193c4dff5a19689d637416820bc623375f2ad4c31a2e3a76e8f4c70440d",
"public": "948413b6667024a0704c2023916c21eaf0a13485a586c43e4d2df520852a4fb8"
}
当前内容版权归 MeiliSearch 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 MeiliSearch .