Create API Key - Push_CreateApiKey
This method allows you to create an API key.
RU vs Guesty
While API key management is done via Rentals United, the API keys created in Rentals United allow the sales channel to access inventory from both Guesty and Rentals United.
Use this operation to create additional Rentals United API keys after the first key pair has been generated in the Rentals United platform.
To generate the first key pair:
- Open API Keys in the Rentals United platform.
- Select + New API Key.
- Enter a descriptive name, select the API scope, and select Create.
- Copy the generated
AccessKey. - Reveal and copy the
SecretKey, or download the key pair as a CSV file. The secret can be revealed only once, so store it securely before closing the dialog.
Use Cases
- Create additional keys after the first key is provisioned
- Issue separate keys for different applications or API scopes
- Rotate a key without changing personal login credentials
Best Practices
- Store the returned
SecretKeyimmediately; it is shown only once - Use a descriptive
Labeland the correctScope - Deploy a replacement key before deleting the old key
- Keep an inventory of which application uses each
AccessKey
Request
XML request
<Push_CreateApiKey_RQ>
<Authentication>
<AccessKey>[AccessKey]</AccessKey>
<SecretKey>[SecretKey]</SecretKey>
</Authentication>
<Label>test</Label>
<Scope>XmlApi</Scope>
</Push_CreateApiKey_RQ>
Request fields
| XML Path | Data Type | Type | Description |
|---|---|---|---|
| Push_CreateApiKey_RQ | C | Root element | |
| Push_CreateApiKey_RQ/Authentication | C, M | Authentication details | |
| Push_CreateApiKey_RQ/Authentication/AccessKey | String(100) | M | Access key |
| Push_CreateApiKey_RQ/Authentication/SecretKey | String(100) | M | Secret key |
| Push_CreateApiKey_RQ/Label | String(255) | M | Key label (name) |
| Push_CreateApiKey_RQ/Scope | String(100) | M | Scope |
Response
XML response
<Push_CreateApiKey_RS>
<Status ID="0">Success</Status>
<ResponseID>0123456789ABCDEF0123456789ABCDEF</ResponseID>
<AccessKey>82VOPLE5L2HAJPY4XMZ5</AccessKey>
<SecretKey>u{SY.qDmi-Y+AjX*ox%4BR(47}0g)zqrDS+Ho.[]</SecretKey>
</Push_CreateApiKey_RS>
Store the SecretKey immediately
The SecretKey is returned only once. Save it in a secure secret manager before
discarding the response.
Response fields
| XML Path | Data Type | Type | Description |
|---|---|---|---|
| Push_CreateApiKey_RS | C | Root element | |
| Push_CreateApiKey_RS/Status | String(100) | M | See ListStatuses |
| Push_CreateApiKey_RS/Status@ID | Integer | M | See ListStatuses |
| Push_CreateApiKey_RS/ResponseID | String(32) | M | Unique response ID |
| Push_CreateApiKey_RS/AccessKey | String(100) | M | Access key |
| Push_CreateApiKey_RS/SecretKey | String(100) | M | Secret key. Take note of it, as it is provided to you only once. |