lundi 5 mars 2018

I got "Invalid sign_data parameter" error

I am currently trying to call the pho.to API to edit photos. I have followed their api doc and am I'm using "inspector.swagger.io" to call this api. I haven't started coding this, just trying to get good response back from the api to make sure it even works. I'm using POST method and I got the same error. I've already checked my key and app_id.

It's my API call testing :

http://opeapi.ws.pho.to/addtask/?app_id=%3Cmy-app-id%3E&key=%3Cmy-key%3E&sign_data=hash_hmac%28%27SHA1%27%2C%3Cdata%3E%2C%20%3Cmy-key%3E%29%2C&data=%3Csee-xml-part%3E

There is the response I get back :

<?xml version="1.0"?>
<image_process_response>
    <status>SecurityError</status>
    <err_code>613</err_code>
    <description>Invalid SIGN_DATA parameter.</description>
</image_process_response>

There is my xml file :

<image_process_call>
    <image_url>http://developers.pho.to/img/girl.jpg</image_url>
    <methods_list>
        <method order="1">
            <name>desaturation</name>
        </method>
        <method order="2">
            <name>caricature</name>
            <params>type=1;crop_portrait=true</params>
        </method>
    </methods_list>
    <thumb1_size>100</thumb1_size>
</image_process_call>

Thanks for help ! I'm there for any questions !

Aucun commentaire:

Enregistrer un commentaire