import.io curl simple data integration

可紊 提交于 2020-01-03 05:31:09

问题


I want to get the simple api integration from https://import.io via curl. I created a magic api and struggle now to get the data.

Do I use the magic api on the browser, it works fine. But with curl I get a {"code":"NOT_AUTHORIZED"}. Obvious that the authentication did not work.

Here's my code

#!/bin/bash

login=foo@bar.com
pass=foobar
userid=foo-bar
apikey=1f2o3o4b5a6r

curl --user $login:$pass https://api.import.io/store/data/033fbe66-13b7-4cf2-ba9c-58183a567a6f/_query?input/webpage/url=https%3A%2F%2Fwww.zalando.de%2Flp-ons-wom-sale-cat-v1%2F%3Forder%3Dsale&_user=$userid&_apikey=$apikey

What am I doing wrong? And how do I get it run with curl?


回答1:


I could get it running. Found https://github.com/import-io/bashtractor/blob/master/bashtractor.sh which solved my problem.



来源:https://stackoverflow.com/questions/33033709/import-io-curl-simple-data-integration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!