Authkey.state: Difference between revisions
		
		
		
		Jump to navigation
		Jump to search
		
w>Jguillo No edit summary  | 
				w>Jguillo No edit summary  | 
				||
| Line 35: | Line 35: | ||
RESPONSE (not authorized):  | RESPONSE (not authorized):  | ||
<pre>  | |||
<?xml version="1.0" encoding="UTF-8"?>  | |||
<authkeystate>  | |||
  <authkey>23j22wtpoguzgzk0fag39sey6</authkey>  | |||
  <authorized>false</authorized>  | |||
</authkeystate>  | |||
</pre>  | |||
RESPONSE (authorized):  | RESPONSE (authorized):  | ||
<pre>  | |||
<?xml version="1.0" encoding="UTF-8"?>  | |||
<authkeystate>  | |||
  <authkey>23j22wtpoguzgzk0fag39sey6</authkey>  | |||
  <authorized>true</authorized>  | |||
  <level>MANAGE</level>  | |||
  <usercode>0907300000160</usercode>  | |||
  <noncekey>4vrghpn0n8jxrrvoi3b7zta1c</noncekey>  | |||
</authkeystate>  | |||
[[Category:API component]]  | [[Category:API component]]  | ||
Revision as of 08:29, 5 May 2010
Returns the state of an authkey and the nonce key associated to it.
Info
- Component name: authkey.state
 - Signature: Requires signature using the sharedkey's private key
 - Timestamp: Requires ztime parameter
 
Parameters
- authkey*: The authkey to query about
 - sharedkey*: Your application shared key
 - ztime*: Z-Timestamp
 
* Required parameter
Returns
- authkeystate
- authkey>: authkey
 - authorized: Indicates if the authkey has been authorized (true|false)
 - level: Authorization level (GET|ADD|MANAGE)
 - usercode: Safe Creative code of the authorizing user
 - noncekey: Nonce key associated to the authkey
 
 
Sample
REQUEST:
https://api.safecreative.org/v2/ ?authkey=23j22wtpoguzgzk0fag39sey6 &component=authkey.state &sharedkey=zy9x4ol0ctg3btyswq7b5wi9 &ztime=1271749822816 &signature=7d6ec7ad668da907286ee2901448af8e3581e37e
RESPONSE (not authorized):
<?xml version="1.0" encoding="UTF-8"?> <authkeystate> <authkey>23j22wtpoguzgzk0fag39sey6</authkey> <authorized>false</authorized> </authkeystate>
RESPONSE (authorized):
<?xml version="1.0" encoding="UTF-8"?> <authkeystate> <authkey>23j22wtpoguzgzk0fag39sey6</authkey> <authorized>true</authorized> <level>MANAGE</level> <usercode>0907300000160</usercode> <noncekey>4vrghpn0n8jxrrvoi3b7zta1c</noncekey> </authkeystate>