Skip to content

Reveal an API secret

POST
/v1/Accounts/{auth_id}/ApiCredentials/Reveal
curl --request POST \
--url https://api.siprtc.io/v1/Accounts/example/ApiCredentials/Reveal \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "which": "primary" }'

Returns the primary secret (the default) or the secondary secret in full. The body is optional. Every reveal is logged with the account and the caller.

Only the account itself may call this: {auth_id} must be the Auth ID you authenticate with (a parent cannot manage a sub-account’s credentials, 403), and agent, supervisor and member accounts have no API credentials to manage (403). Replies carry Cache-Control: no-store.

auth_id
required
string

Your Auth ID.

Which secret to return.

Media type application/json
object
which

Which secret to return: primary (default) or secondary.

string
default: primary
Allowed values: primary secondary

Example

primary

The secret.

Media type application/json
object
data

The secret asked for.

object
secret

The secret, 40 characters. Use it as the Basic-auth password.

string
status

Always “success”.

string

Example

{
"data": {
"secret": "EXAMPLESECRET000000000000000000000000000"
},
"status": "success"
}

The body is not JSON, or which is neither primary nor secondary.

Media type application/json
object
error

The underlying error text. Only some 400 responses of the tenant list carry it.

string
message

What went wrong, in English.

string
status

Always “failed”.

string

Example

{
"error": "sql: connection is already closed",
"message": "Account Details not found",
"status": "failed"
}

Authentication failed: wrong or missing credentials, a disabled account, or an {auth_id} that is neither you nor your direct sub-account.

Media type application/json
string

Example generated

example

{auth_id} is not the authenticated account, or the account has no API credentials to manage.

Media type application/json
object
error

The underlying error text. Only some 400 responses of the tenant list carry it.

string
message

What went wrong, in English.

string
status

Always “failed”.

string

Example

{
"error": "sql: connection is already closed",
"message": "Account Details not found",
"status": "failed"
}

There is no secondary secret, or the account was not found.

Media type application/json
object
error

The underlying error text. Only some 400 responses of the tenant list carry it.

string
message

What went wrong, in English.

string
status

Always “failed”.

string

Example

{
"error": "sql: connection is already closed",
"message": "Account Details not found",
"status": "failed"
}

The secret could not be read.

Media type application/json
object
error

The underlying error text. Only some 400 responses of the tenant list carry it.

string
message

What went wrong, in English.

string
status

Always “failed”.

string

Example

{
"error": "sql: connection is already closed",
"message": "Account Details not found",
"status": "failed"
}