Nonce key: Difference between revisions

From Safe Creative API
Jump to navigation Jump to search
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
A '''nonce key''' is a one-time key that must be used for additional security on some API operations, for instance [[work.register]].
A '''nonce key''' is a one-time key that must be used for additional security on some API operations, for instance [[work.register]].


To get a nonce key, you must call [[authkey.state]]. The nonce key changes each time it is used, so you need to get a new nonce key for each operation.
To get a nonce key, you must call [[authkey.state]]. The nonce key changes each time it is used, so you need to get a new nonce key for each operation that requires one.


= Example =
= Example =
Line 16: Line 16:
RESPONSE:
RESPONSE:


<pre>
 
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<authkeystate>
<authkeystate>
  <authkey>1i5g2aaf2bz09lyo867cuimqg</authkey>
  <authkey>1i5g2aaf2bz09lyo867cuimqg</authkey>
  <level>MANAGE</level>
  <level>MANAGE</level>
  <noncekey>4vrghpn0n8jxrrvoi3b7zta1c</noncekey>
  '''<noncekey>4vrghpn0n8jxrrvoi3b7zta1c</noncekey>'''
  <usercode>0907100000018</usercode>
  <usercode>0907100000018</usercode>
  <authorized>true</authorized>
  <authorized>true</authorized>
</authkeystate>
</authkeystate>
</pre>

Latest revision as of 11:30, 20 April 2022

A nonce key is a one-time key that must be used for additional security on some API operations, for instance work.register.

To get a nonce key, you must call authkey.state. The nonce key changes each time it is used, so you need to get a new nonce key for each operation that requires one.

Example

REQUEST to get a nonce key

https://api.safecreative.org/v2/
?component=authkey.state
&authkey=1i5g2aaf2bz09lyo867cuimqg
&sharedkey=zy9x4ol0ctg3btyswq7b5wi9
&ztime=1271749829192
&signature=508333b024993bbe54261a8c6713767dfe3ec9b1

RESPONSE:


<?xml version="1.0" encoding="UTF-8"?>
<authkeystate>
  <authkey>1i5g2aaf2bz09lyo867cuimqg</authkey>
  <level>MANAGE</level>
  <noncekey>4vrghpn0n8jxrrvoi3b7zta1c</noncekey>
  <usercode>0907100000018</usercode>
  <authorized>true</authorized>
</authkeystate>