Authorize
Jump to navigation
Jump to search
This operation can be used instead of the web authorization page, if the application has access to the user's credentials.
Usage of this operation is discouraged for security and privacy reasons, so that the application doesn't need to know the user's access credentials.
It is preferred to redirect the user to https://web.safestamper.com/authorize/<AUTHKEY>, as explained in User authorization
This operation is only available for designated partners.
URL
https://www.safestamper.com/api/authorize
Parameters
- sharedkey: Your API client shared key
- username: Username or e-mail of Safe Stamper account to authorize
- password: Password of Safe Stamper account
- signature: Parameters signature, as explained in Signature parameter
Returns
A JSON object with the authorization key status, as returned by authstate:
- authkey: Authkey value
- authorized: true/false.
HTTP Errors
- 403 Forbidden: the sharedkey or signature are not valid
- 401 Unauthorized: the username or password are not valid
Example
REQUEST:
https://www.safestamper.com/api/authorize ?sharedkey=axvmfqn8aex21mxhq5zsj7l482saxfu7j4hh &username=apitest &password=ddddd &signature=686349c6cbb0fe9094ec26927f4e62306a0263ae
RESPONSE (actual response has no line breaks or indentation):
{ "authkey":"0021d81c-e4a5-4869-8384-2fd70cdb58ec", "authorized":true, "availableCertificates":50, "availableNavigations":3, "userCode":"1612020000541", "userName":"Api User Test" }