-
Notifications
You must be signed in to change notification settings - Fork 11
api_user
Daniel Ramsay edited this page Mar 19, 2023
·
3 revisions
Register a new set of API credentials.
Field | Value |
---|---|
A contact email address for the account | |
password | A password to use for the account |
The password supplied can be used for account recovery and resetting the secret key.
{
"status":"pending",
"success":true,
"secret":"mlpWUvM5ml9VXgII8T8vnHDIKKDQbUgxgFua"
}
The returned secret
value should be safely stored client-side, and should
be used to sign API requests or supplied as an HTTP basic auth password
to authenticate requests.
Check on user registration status
Field | Value |
---|---|
A contact email address for the account | |
date | The current time
|
signature | User Private Key
|
{
"success":true,
"status":"pending|failed|ok"
}
Send a verification token to the API (received from a user clicking an email link to opt-in to email reports. The API receives the token and activates the corresponding subscription. The same token mechanism can to be used to validate multiple subscription types (URL alert, monthly summary, etc).
Field | Example Payload |
API user's email account (not the end user's) | |
date | Message Timestamp |
token | (something hex-ish, probably sha or md5 based) |
signature | User Private Key `hex_hmac($token + ':' + $date, $secret)` |
{
"success": true,
"verified": true
}