When I
make the following request I get
error code 2899 response with the xml file. I have shared the application and have obtained a valid api key from the server. Any idea what the problem could be?
<
?
xml
version="1.0" encoding="UTF-8"?>
<
form method="POST" action="https://creator.zoho.com/api/xml/sensor-test/form/temp_and_time/record/add/">
<
input type="hidden" name ="
apikey" id="
apikey" value="MY-API-KEY">
<
input type="hidden" name ="scope" id="scope" value="
creatorapi">
<
input type="text" name="humidity" value="45">
<
input type="text" name="temperature" value="12">
<
input type="submit" value="Add Record">
</
form>
curl --verbose --request POST --data-binary "@dat
.xml" --header "Content-Type: text/xml" "https://creator.zoho.com/api/sinbit/xml/sensor-test/form/temp_and_time/record/add/"
* About to connect
() to creator.zoho.com port 443 (#0)
* Trying 74.201.154.156...
* connected
* Connected to creator.zoho.com (74.201.154.156) port 443 (#0)
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using RC4-SHA
* Server certificate:
*
subject: C=IN; ST=Tamilnadu; L=Chennai; O=ZOHO Corporation; OU=ZOHO Corporation; CN=*.zoho.com
*
start date: 2012-04-12 00:00:00 GMT
*
expire date: 2014-04-12 23:59:59 GMT
*
common name: *.zoho.com (matched)
*
issuer: C=US; O=Thawte, Inc.; CN=Thawte SSL CA
*
SSL certificate verify ok.
> POST /api/
sinbit/xml/sensor-test/form/temp_and_time/record/add/ HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12
.0)
libcurl/7.24.0 OpenSSL/0.9.8x
zlib/1.2.5
> Host: creator.zoho.com
> Accept: */*
> Content-Type: text/xml
> Content-Length: 488
>
* upload completely sent off: 488 out of 488 bytes
< HTTP/1.1 200 OK
< Server: ZGS
< Date: Tue, 17 Dec 2013 17:23:33 GMT
< Content-Type: text/xml
;charset=UTF-8
< Content-Length: 144
< Connection: keep-alive
< Set-Cookie: fc0095f676=b14ec78d521f46341f690469c45cade6; Path=/
< Set-Cookie: JSESSIONID=9BEEDFC7C07B927E5D81B0FBAE13F80E; Path=/; Secure
< Set-Cookie: zcccn=56850114-9bb3-4ae4-bf8f-eab59aa64e25; Path=/; Secure
<
Pragma: no-cache
< Cache-Control: no-cache
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Content-disposition: attachment
;filename="RestApi.xml"
< Vary: Accept-Encoding
,User-Agent
< Strict-Transport-Security: max-age=432000
<
<
response><
errorlist><error><code>2899</code><message><![CDATA
[Permission Denied To Add Record(s).]]></message></error></
errorlist></response>
* Connection #0 to host creator.zoho.com left intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):