Each account in the Poken System may have one or more poken devices associated with it. This method allows to link a device to the users account. This endpoint should be access only by passing one of the 3 parameters: deviceAccessToken, contactstring or deviceId To obtain a deviceAccessToken call the method "Upload Contact String" passing the HTML file on the Poken device as parameter. The method returns a Device Access Token which can be used in this method to link the device to the user account. If the 'deviceId' parameter is provided, make sure the device is part of the same poken campaign as the account making the request
Table 24. Parameters for " Link Poken to Account "
|deviceAccessToken||FORM||String||(optional) The accessToken of the poken device to link to the users account.|
|objectId||FORM||long||(optional) id of the object/identity to be linked to this device. If not provided the account's default object will be used.|
|contactstring||FORM||String||(optional) Token or url of this device, example 2011abcdef1234567890bedd2fdd4150.|
|deviceId||FORM||long||(optional) id of the device to be linked to the account making the request|
|forAccountId||FORM||long||(optional) this parameter can be provided only if used with 'deviceId' parameter. Allows linking a campaign device to an account making an unauthenticated call. Will only succeed if the 'forAccountId' is part of one campaign of the API client making the request.|
|forCampaignId||FORM||long||(optional) this parameter can be provided only if used with 'forAccountId' and if the user making the request is an owner of the provided campaign. Allows linking the device to the campaign, in case it was not already linked, and to the provided 'accountId'.|
The account specified is invalid.
This endpoint is supported just for OAuth2 requests.
The user does not have access to update this object.
The oject Id specified does not exist.
An unhandled exception has occured.
Not a valid deviceAccessToken provided!
Unabled to update the device detail information.
The provided device is not linked to a campaign.
Device linked to a different campaign then the account making the request.
Device linked to a campaign that is no longer available.
Unable to link account to the device!
No parameter provided for linking a device to an account!
Tag URI/URL failed validation!
This device is already linked to an account!
The client making the request doesn't have a common campaign with the account to link the device to
The provided device is not valid
Can not link the device to the object's campaign. The campaign already has the number of maximum demo devices linked to it
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://xsd.poken.com" xmlns:tns="http://xsd.poken.com" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="response"> <xs:complexType> <xs:sequence> <xs:element name="success" type="tns:Status" default="FAILURE" minOccurs="0"/> <xs:element name="error" type="tns:Error" nillable="true" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="Error"> <xs:sequence> <xs:element name="code" type="xs:string"/> <xs:element name="description" type="xs:string"/> </xs:sequence> </xs:complexType> <xs:simpleType name="Status"> <xs:restriction base="xs:string"> <xs:enumeration value="SUCCESS"/> <xs:enumeration value="FAILURE"/> </xs:restriction> </xs:simpleType> </xs:schema>