Work.download.private: Difference between revisions

From Safe Creative API
Jump to navigation Jump to search
w>Jguillo
(Created page with 'Returns the download URL for a user's work. The returned URL is only valid for a limited time. = Info = * '''Component name:''' work.download.private * '''Signature:''' Requires…')
 
m (6 revisions imported)
 
(5 intermediate revisions by 2 users not shown)
Line 4: Line 4:
* '''Component name:''' work.download.private
* '''Component name:''' work.download.private
* '''Signature:''' Requires signature using the authkey's private key
* '''Signature:''' Requires signature using the authkey's private key
* '''Timestamp:''' ZTime is not required
* '''Timestamp:''' Requires ztime parameter
* '''Authorization level:''' GET
* '''Authorization level:''' GET
* '''API trust level''': Standard


= Parameters =  
= Parameters =  
* '''authkey*:''' Authorization key of the work owner
* '''authkey*:''' Authorization key of the work owner
* '''ztime*:''' Z-Timestamp
* '''code*:''' Work code
* '''code*:''' Work code


Line 16: Line 18:
* '''url''': Download URL
* '''url''': Download URL


= Sample =
= Example =
REQUEST:
REQUEST:


Line 23: Line 25:
  &'''authkey'''=Bb7NTK14QGeHjluE3vziqQ
  &'''authkey'''=Bb7NTK14QGeHjluE3vziqQ
  &'''code'''=1003030120266
  &'''code'''=1003030120266
&'''ztime'''=1271749826106
  &'''signature'''=06797af03767a19fef5acae915ff2b11bdad5535
  &'''signature'''=06797af03767a19fef5acae915ff2b11bdad5535


Line 29: Line 32:
<pre>
<pre>
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<url>[...]</url>
<downloadinfo>
  <url>[...]</url>
  <mimetype>[...]</mimetype>
</downloadinfo>
</pre>
</pre>


[[Category:API component]]
[[Category:API component]]

Latest revision as of 08:07, 7 May 2021

Returns the download URL for a user's work. The returned URL is only valid for a limited time.

Info

  • Component name: work.download.private
  • Signature: Requires signature using the authkey's private key
  • Timestamp: Requires ztime parameter
  • Authorization level: GET
  • API trust level: Standard

Parameters

  • authkey*: Authorization key of the work owner
  • ztime*: Z-Timestamp
  • code*: Work code

* Required parameter

Returns

  • url: Download URL

Example

REQUEST:

https://api.safecreative.org/v2/
?component=work.download.private
&authkey=Bb7NTK14QGeHjluE3vziqQ
&code=1003030120266
&ztime=1271749826106
&signature=06797af03767a19fef5acae915ff2b11bdad5535

RESPONSE:

<?xml version="1.0" encoding="UTF-8"?>
<downloadinfo>
  <url>[...]</url>
  <mimetype>[...]</mimetype>
</downloadinfo>