User.link: Difference between revisions

From Safe Creative API
Jump to navigation Jump to search
w>Jguillo
No edit summary
m 10 revisions imported
 
(7 intermediate revisions by 2 users not shown)
Line 9: Line 9:
= Info =
= Info =


Component name: user.link
* '''Component name''': user.link
* '''Signature''': Requires signature using the shared key's private key
* '''Signature''': Requires signature using the shared key's private key
* '''Timestamp''': Requires ztime parameter
* '''Timestamp''': Requires ztime parameter
Line 20: Line 20:
* '''mail*:''' user mail
* '''mail*:''' user mail
* '''level*:''' desired authorization level: GET, ADD, MANAGE
* '''level*:''' desired authorization level: GET, ADD, MANAGE
* '''firstName:''' first name of the user
* '''firstName?:''' first name of the user
* '''middleName:''' middle name of the user
* '''lastName?:''' last name of the user
* '''lastName:''' last name of the user
* '''addressLine1:''' user address line 1
* '''addressLine1:''' user address line 1
* '''addressLine2:''' user address line 2
* '''addressLine2:''' user address line 2
Line 28: Line 27:
* '''addressCity:''' user address zip city
* '''addressCity:''' user address zip city
* '''addressCountry:''' user address country code (see [[user.countries]])
* '''addressCountry:''' user address country code (see [[user.countries]])
* '''sendNotifications:''' 1 if user wants to be sent daily notifications of his operations (default). 0 if user does not want notifications.
* '''locale:''' user preferred locale
* '''locale:''' user preferred locale


<nowiki>*</nowiki> Required parameter
<nowiki>*</nowiki> Required parameter
(?): At least provide one field (First or last name)


= Returns =
= Returns =
Line 39: Line 41:
** '''privatekey''': Private key of the authorization
** '''privatekey''': Private key of the authorization


= Sample =
= Example =


REQUEST:
REQUEST:
Line 68: Line 70:
</userlink>
</userlink>
</pre>
</pre>
[[Category:API component]]

Latest revision as of 08:07, 7 May 2021

Partner component to link a user to the application.

If the provided e-mail address corresponds to a Safe Creative user, an authorization will be automatically created for that user and a mail will be sent.

If no user was found with that e-mail address, a new user account will be created with the provided data and an authorization will be created. A mail will be sent to the user for him to activate the account.

You must be a Safe Creative partner to use this component.

Info

  • Component name: user.link
  • Signature: Requires signature using the shared key's private key
  • Timestamp: Requires ztime parameter
  • API trust level: Partner

Parameters

  • sharedkey*: Your application shared key
  • ztime*: Z-Timestamp
  • mail*: user mail
  • level*: desired authorization level: GET, ADD, MANAGE
  • firstName?: first name of the user
  • lastName?: last name of the user
  • addressLine1: user address line 1
  • addressLine2: user address line 2
  • addressZip: user address zip code
  • addressCity: user address zip city
  • addressCountry: user address country code (see user.countries)
  • sendNotifications: 1 if user wants to be sent daily notifications of his operations (default). 0 if user does not want notifications.
  • locale: user preferred locale

* Required parameter

(?): At least provide one field (First or last name)

Returns

  • userlink
    • usercode User code
    • authkey: Authorization key for this user
    • privatekey: Private key of the authorization

Example

REQUEST:

https://api.safecreative.org/v2/
?component=user.link
&sharedkey=zy9x4ol0ctg3btyswq7b5wi9
&level=MANAGE
&mail=sholmes%40baker.fake
&firstname=Sherlock
&lastname=Holmes
&addressline1=221B+Baker+Street
&addressline2=City+of+Westminster
&addresscity=London
&addresscountry=GB
&locale=en
&ztime=1271749826106
&signature=3b2d5552b5cd969c370ce70dae280a76dc844895

RESPONSE:

<?xml version="1.0" encoding="UTF-8"?>
<userlink>
  <usercode>0907300000160</usercode>
  <authkey>e5qxwqwuh2bowtp2u2w0v8vd</authkey>
  <privatekey>52c59d4dddn5n4ub3qs32osny</privatekey>
</userlink>