App passwords
Passwords for mail, calendar and contacts apps that can't do Bramble's two-step sign-in. Each is shown once when created, and can be revoked on its own.
| Method | Path | Summary |
|---|---|---|
| GET | /v1/user/app-passwords | List your app passwords |
| POST | /v1/user/app-passwords | Create an app password |
| DELETE | /v1/user/app-passwords/:id | Revoke an app password |
#List your app passwords
GET
/v1/user/app-passwords- Address
https://<your-org>.brambleit.cloud/api/v1/user/app-passwords- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Response 200
| Field | Type | Description |
|---|---|---|
success | boolean | |
app_passwords | array of any |
Example response
JSON
{
"success": true,
"app_passwords": []
}Example request
Bash
curl -X GET 'https://<your-org>.brambleit.cloud/api/v1/user/app-passwords' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/user/app-passwords', {
method: 'GET',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.get(
"https://<your-org>.brambleit.cloud/api/v1/user/app-passwords",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method GET -Uri 'https://<your-org>.brambleit.cloud/api/v1/user/app-passwords' -Headers $headers#Create an app password
POST
/v1/user/app-passwordsThe password is in the response once; it can't be shown again.
- Address
https://<your-org>.brambleit.cloud/api/v1/user/app-passwords- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Request body JSON
| Name | Type | Description |
|---|---|---|
name | string | What it's for, e.g. "Phone calendar". |
Response 201
| Field | Type | Description |
|---|---|---|
success | boolean | |
app_password | any |
Example response
JSON
{
"success": true,
"app_password": null
}Example request
Bash
curl -X POST 'https://<your-org>.brambleit.cloud/api/v1/user/app-passwords' \
-H "X-API-Key: $BRAMBLE_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Example name"}'JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/user/app-passwords', {
method: 'POST',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({"name":"Example name"}),
});
const data = await res.json();Python
import os, requests
r = requests.post(
"https://<your-org>.brambleit.cloud/api/v1/user/app-passwords",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
json={"name":"Example name"},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
$body = '{"name":"Example name"}'
Invoke-RestMethod -Method POST -Uri 'https://<your-org>.brambleit.cloud/api/v1/user/app-passwords' -Headers $headers -ContentType 'application/json' -Body $body#Revoke an app password
DELETE
/v1/user/app-passwords/:id- Address
https://<your-org>.brambleit.cloud/api/v1/user/app-passwords/:id- Requires
- Signed-in session,
X-API-Key, or a Bramble app access token (Authorization: Bearer).
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | number |
Response 200
| Field | Type | Description |
|---|---|---|
success | boolean |
Example response
JSON
{
"success": true
}Errors
| Status | Message |
|---|---|
| 404 | App password not found |
Example request
Bash
curl -X DELETE 'https://<your-org>.brambleit.cloud/api/v1/user/app-passwords/12.5' \
-H "X-API-Key: $BRAMBLE_KEY"JavaScript
const res = await fetch('https://<your-org>.brambleit.cloud/api/v1/user/app-passwords/12.5', {
method: 'DELETE',
headers: { 'X-API-Key': process.env.BRAMBLE_KEY },
});
const data = await res.json();Python
import os, requests
r = requests.delete(
"https://<your-org>.brambleit.cloud/api/v1/user/app-passwords/12.5",
headers={"X-API-Key": os.environ["BRAMBLE_KEY"]},
)
r.raise_for_status()
data = r.json()PowerShell
$headers = @{ 'X-API-Key' = $env:BRAMBLE_KEY }
Invoke-RestMethod -Method DELETE -Uri 'https://<your-org>.brambleit.cloud/api/v1/user/app-passwords/12.5' -Headers $headersWas this page helpful?
Thanks for your feedback.