Skip to content

Commit 7c54020

Browse files
authored
Merge pull request #16 from modzy/update/apiKeys
Fixes #15
2 parents 0eb5dfb + e6a0557 commit 7c54020

File tree

2 files changed

+9
-19
lines changed

2 files changed

+9
-19
lines changed

README.md

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,38 +44,28 @@ You can also install from Github:
4444

4545
- `$ npm install modzy/sdk-javascript`
4646

47-
## Initialize
47+
## Get your API key
4848

4949
Once you have a `model` and `version` identified, get authenticated with your API key.
5050

51-
API keys are security credentials required to perform API requests to Modzy. Our API keys are composed of an ID that is split by a dot into two parts: the prefix and the body. +
52-
The *prefix* is the API keys' visible part. It’s only used to identify the key and by itself, it’s unable to perform API requests.
51+
API keys are security credentials required to perform API requests to Modzy. Our API keys are composed of an ID that is split by a dot into two parts: a public and private part.
5352

54-
[List your API keys](https://models.modzy.com/docs/users-keys/api-keys/retrieve-users-api-keys):
53+
The *public* part is the API keys' visible part only used to identify the key and by itself, it’s unable to perform API requests.
5554

56-
```javascript
57-
const keys = await modzyClient.getAccountingClient().getAPIKeys('[email protected]');
58-
keys.forEach(
59-
key => {
60-
console.log(JSON.stringify(key));
61-
}
62-
);
63-
```
55+
The *private* part is the public part's complement and it’s required to perform API requests. Since it’s not stored on Modzy’s servers, it cannot be recovered. Make sure to save it securely. If lost, you can [replace the API key](https://models.modzy.com/docs/users-keys/api-keys/replace-API-key).
6456

65-
The *body* is the prefix’s complement and it’s required to perform API requests. Since it’s not stored on Modzy’s servers, it cannot be recovered. Make sure to save it securely. If lost, you can [replace the API key's body](https://models.modzy.com/docs/users-keys/api-keys/replace-API-key).
6657

67-
[Retrieve the API key's body](https://models.modzy.com/docs/users-keys/api-keys/retrieve-full-API-key):
58+
Find your API key in your user profile. To get your full API key click on "Get key":
6859

69-
```javascript
70-
const hash = await modzyClient.getAccountingClient().getKeyBody('yourKey');
71-
console.log("The hash is: "+hash);
72-
```
60+
<img src="key.png" alt="get key" width="10%"/>
61+
62+
## Initialize
7363

7464
Get authenticated with your API key:
7565

7666
```javascript
7767
const modzy = require('modzy-sdk');
78-
const modzyClient = new modzy.ModzyClient("http://url.to.modzy/api", "prefix.body");
68+
const modzyClient = new modzy.ModzyClient("http://url.to.modzy/api", "API Key");
7969
```
8070

8171
## Basic usage

key.png

17.4 KB
Loading

0 commit comments

Comments
 (0)