问题
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