Hello all,
I have been trying to make a POST request using Alteryx and connecting it to Vtiger.
In order to succesfully connect to Vtiger the following needs to happen:
- Get a challenge token and create an accessKey
- Using that accessKey to login.
I have been able to generate an accesKey using Alteryx (and the GET command for the challenge token). However I am stuck on the POST request. Here is what I am doing in Postman:
Postman Header:
Postman Body:
In the header the content-type needs to be defined
In the body the operation, username and accessKey needs to be defined.
In Postman using the full URL with the body doesn't work:
Now here is what I did in Alteryx
URL: Same as you see in the postman request and encoding it.
Alteryx Headers:
Alteryx Body:
Using this I get a blank response on download data. The response is:
HTTP/1.1 302 Found
Date: Wed, 15 Nov 2017 14:58:17 GMT
Server: Apache
Location: https://yourwebsite.od1.vtiger.com/webservice.php?
Cache-Control: max-age=2592000
Expires: Fri, 15 Dec 2017 14:58:17 GMT
Content-Length: 235
Content-Type: text/html; charset=iso-8859-1
HTTP/1.0 500 Internal Server Error
Date: Wed, 15 Nov 2017 14:58:17 GMT
Server: Apache
Strict-Transport-Security: max-age=15768000
Cache-Control: max-age=2592000
Expires: Fri, 15 Dec 2017 14:58:17 GMT
Content-Length: 0
Connection: close
Content-Type: text/html
However. If I use the full URL (http://yourwebsite.od1.vtiger.com/webservice.php?operation=login&username=username123@yoursite.com&accessKey=key12345) Instead of the URL just ending in "webservice.php?" I do get a response with invalid credentials (the same response Postman will give if you try to use the full URL).
Can anyone spot an error or help me in the right direction? I have tried several solutions but can't get the POST request to work properly. What I do see in the response above is that the Content-Type is set as text/html while I have specified it as application/x-www-form-urlencoded
Solutions I have tried:
- Generating a JSON and adding this as the body
- Manually specifying the body credentials using the "add" function
Kind regards,
¡Resuelto! Ir a solución.
I’m not familiar with connecting to that service specifically, but looking at their documentation, you may be missing a step When constructing your “accessKey” parameter value. After you concatenated your TOKENSTRING and access key, did hash it with MD5? Alteryx does have 2 md5 functions that you can try.
If that doesn’t solve it, I’d recommend downloading/installing Fiddler to see what Alteryx is actually sending to the API.
Hope this helps!
Jimmy
Hi @jrgo
Thanks for your reply. In the first part of the workflow I automated the Token + MD5 function.
I have tested both MD5 functions and MD5_ASCII([Challenge Token]+[Access Key]) was the correct one.
In order to really know if the accessKey works I have copied it from Alteryx and pasted it in Postman which produces a good response.
Either today or tomorrow I will get some help from a developer within our company. Should we get it working i'll post the results here.
Solution was found.
Turns out I had a http request set but I needed to make it a https request.
A small but often overlooked mistake. Thanks for the help!
I was getting the same error. I had imported the table using lower case. I re-imported the table with upper case and it worked.
does anyone know if it is possible to force the content-type to application/json in the download tool, while making a post call?