<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.safestamper.com/index.php?action=history&amp;feed=atom&amp;title=API_Overview</id>
	<title>API Overview - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.safestamper.com/index.php?action=history&amp;feed=atom&amp;title=API_Overview"/>
	<link rel="alternate" type="text/html" href="https://wiki.safestamper.com/index.php?title=API_Overview&amp;action=history"/>
	<updated>2026-06-15T19:53:01Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://wiki.safestamper.com/index.php?title=API_Overview&amp;diff=3&amp;oldid=prev</id>
		<title>Adminwiki: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.safestamper.com/index.php?title=API_Overview&amp;diff=3&amp;oldid=prev"/>
		<updated>2023-10-17T11:27:26Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:27, 17 October 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Adminwiki</name></author>
	</entry>
	<entry>
		<id>https://wiki.safestamper.com/index.php?title=API_Overview&amp;diff=2&amp;oldid=prev</id>
		<title>api&gt;Admin: /* User authorization */</title>
		<link rel="alternate" type="text/html" href="https://wiki.safestamper.com/index.php?title=API_Overview&amp;diff=2&amp;oldid=prev"/>
		<updated>2021-08-10T11:17:08Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;User authorization&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= API architecture =&lt;br /&gt;
&lt;br /&gt;
Safe Stamper API is a REST-like interface to Safe Stamper services.&lt;br /&gt;
&lt;br /&gt;
There are two trust levels for applications using Safe Stamper API.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Standard API&amp;#039;&amp;#039;&amp;#039;: This comprises the bulk of Safe Stamper services. You need to generate a user authorization key for each Safe Stamper user that works through your application.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Partners API&amp;#039;&amp;#039;&amp;#039;: Some components are reserved for use by Safe Stamper partners. Contact [mailto:community@safecreative.org community@safecreative.org] if you want to become a partner.&lt;br /&gt;
&lt;br /&gt;
= Obtaining the keys to use the API =&lt;br /&gt;
&lt;br /&gt;
To use the Safe Stamper API, you need a pair of keys: &lt;br /&gt;
* A &amp;#039;&amp;#039;&amp;#039;shared key&amp;#039;&amp;#039;&amp;#039; that identifies your client application&lt;br /&gt;
* A &amp;#039;&amp;#039;&amp;#039;private key&amp;#039;&amp;#039;&amp;#039; used for signing your requests&lt;br /&gt;
&lt;br /&gt;
To get your pair of API keys, you can contact us through [https://www.safestamper.com/contact Safe Stamper contact form]&lt;br /&gt;
&lt;br /&gt;
= Arena sandbox environment =&lt;br /&gt;
&lt;br /&gt;
There is a testing environment available at http://arena.safestamper.com. &lt;br /&gt;
&lt;br /&gt;
This is a complete replica of the Safe Stamper web site, including an API server. You can create user accounts, make certifications and request API keys.&lt;br /&gt;
&lt;br /&gt;
It is strongly encouraged to use the arena environment for testing the API before using your application on the real service. To do so, you must request your application key at [https://www.safestamper.com/contact Safe Stamper contact form]. When we activate your api keys, you can start testing the API.&lt;br /&gt;
&lt;br /&gt;
As a matter of fact, API keys for production environment will not be activated if the application has not been previously tested against the arena environment&lt;br /&gt;
&lt;br /&gt;
= Accessing the API =&lt;br /&gt;
&lt;br /&gt;
Safe Stamper API Services are accessible via a REST-like interface. The interface is rooted at &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://www.safestamper.com/api/&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for production services and &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://arena.safestamper.com/api/&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for the arena environment.&lt;br /&gt;
&lt;br /&gt;
All requests must be done using the UTF-8 charset (HTTP request charset should be UTF-8).&lt;br /&gt;
Responses are formatted as JSON. It is strongly recommended to use HTTPS instead of HTTP. HTTP requests are automatically redirected to HTTPS.&lt;br /&gt;
&lt;br /&gt;
= Parameters =&lt;br /&gt;
&lt;br /&gt;
Parameters can be sent by POST or GET. You can mix POST and GET parameters.&lt;br /&gt;
&lt;br /&gt;
There are some common parameters:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;sharedkey&amp;#039;&amp;#039;&amp;#039; is the key assigned to the application.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;authkey&amp;#039;&amp;#039;&amp;#039; is the user&amp;#039;s authorization for the application to use his account. &lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;signature&amp;#039;&amp;#039;&amp;#039; is a hash of the request computed using the private key associated to the sharedkey. See [[signature parameter]].&lt;br /&gt;
&lt;br /&gt;
Read the [[API Reference]] to know the parameters expected by each component. Non-required parameters can be omitted from a component call.&lt;br /&gt;
&lt;br /&gt;
For additional security, you may include a &amp;#039;&amp;#039;&amp;#039;nonce&amp;#039;&amp;#039;&amp;#039; parameter with any random value, to get different signatures in repeated operations.&lt;br /&gt;
&lt;br /&gt;
= URL syntax =&lt;br /&gt;
&lt;br /&gt;
API calls usually have the following format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.safestamper.com/api/{component}?parameter1=value1&amp;amp;parameter2=value2&amp;amp;signature={signature}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some operations do not require a signature, so you can avoid calculating and sending it.&lt;br /&gt;
&lt;br /&gt;
= Request signature = &lt;br /&gt;
&lt;br /&gt;
See [[Signature parameter]]&lt;br /&gt;
&lt;br /&gt;
API operations require a signature of the request. This signature is the HMAC-SHA1 hash of the arguments (sorted by argument name) using the private key associated to your shared key.&lt;br /&gt;
&lt;br /&gt;
= User authorization =&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;IMPORTANT:&amp;#039;&amp;#039;&amp;#039; If you API keys are linked to your user account, you don&amp;#039;t need to perform this process and don&amp;#039;t need to include the &amp;#039;&amp;#039;authkey&amp;#039;&amp;#039; parameter in API calls.&lt;br /&gt;
&lt;br /&gt;
In order to use our services on behalf of a user, you need that user&amp;#039;s authorization.&lt;br /&gt;
User&amp;#039;s authorizations are represented by an &amp;#039;&amp;#039;&amp;#039;authkey&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
You create an authkey with [[createauth]], or [[newuser]] if you are a partner.&lt;br /&gt;
&lt;br /&gt;
After creating an authkey with [[createauth]], the user must authorize your application by visiting &amp;#039;&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;https://www.safestamper.com/authorize/&amp;lt;AUTHKEY&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This web page can receive a parameter &amp;#039;&amp;#039;&amp;#039;r&amp;#039;&amp;#039;&amp;#039; with a url where the user will be redirected after authorizing (or rejecting) your authkey.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://www.safestamper.com/authorize/c498d3e0-aedb-48fe-82d5-5dec4270318b?r=http%3A%2F%2Fwww.example.com%2Fauthreturn&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example will redirect the user to http://www.example.com/authreturn after the authorization process.&lt;br /&gt;
&lt;br /&gt;
= Error handling =&lt;br /&gt;
&lt;br /&gt;
Errors are returned as HTTP status codes.&lt;br /&gt;
&lt;br /&gt;
Common errors include:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;400 (Bad request)&amp;#039;&amp;#039;&amp;#039; missing or invalid parameter (response body will indicate the wrong parameter)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;403 (Forbidden)&amp;#039;&amp;#039;&amp;#039; sharedkey or signature are not valid&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;401 (Unauthorized)&amp;#039;&amp;#039;&amp;#039; authkey not valid or not authorized&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;429&amp;#039;&amp;#039;&amp;#039; Certificates quota error. The user account does not have certification credits available.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;430&amp;#039;&amp;#039;&amp;#039; Disk quota error. The user account does not have storage space available.&lt;br /&gt;
&lt;br /&gt;
= API callbacks =&lt;br /&gt;
Your API client can have an associated callback URL. Your callback URL will be called for various events.&lt;br /&gt;
&lt;br /&gt;
Your API callback URL will receive a POST request with the following parameters:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;event&amp;#039;&amp;#039;&amp;#039;: The callback event code&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;data&amp;#039;&amp;#039;&amp;#039;: A JSON object with relevant data associated to the event&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;sharedkey&amp;#039;&amp;#039;&amp;#039;: Your shared API key&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;signature&amp;#039;&amp;#039;&amp;#039;: The callback parameters [[Signature parameter|signature]], calculated with your private API key&lt;br /&gt;
&lt;br /&gt;
Check the [[API Reference]] of each API operation for the different callback events you may receive.&lt;br /&gt;
&lt;br /&gt;
= See also =&lt;br /&gt;
* [[API Reference]]&lt;/div&gt;</summary>
		<author><name>api&gt;Admin</name></author>
	</entry>
</feed>