May 19, 20178 yr Trying to get FMP 16 solution to integrate with Shippo to get shipping rates but keep getting an authentication error. I suspect my syntax is wrong in the cURL component of the Insert from URL step. I've checked the URL ($url) and token ($token) and they are correct values. Any help is greatly appreciated. Shippo API: curl https://api.goshippo.com/shipments/ \ -H "Authorization: ShippoToken shippo_test_4f4d4302e76f97f922d6fb957a9c156712bec772" \ -H "Content-Type: application/json" \ -d '{ "address_from":{ "name":"Mr. Hippo", "street1":"215 Clayton St.", "city":"San Francisco", "state":"CA", "zip":"94117", "country":"US", "phone":"+1 555 341 9393", "email":"[email protected]" }, "address_to":{ "name":"Mrs. Hippo", "street1":"965 Mission St.", "city":"San Francisco", "state":"CA", "zip":"94105", "country":"US", "phone":"+1 555 341 9393", "email":"[email protected]" }, "parcels":[{ "length":"5", "width":"5", "height":"5", "distance_unit":"in", "weight":"2", "mass_unit":"lb" }], "async": false }' My cURL code in the Insert from URL step: "-H & Authorization: ShippoToken" & $token & "-H" & "Content-Type: application/json" & "-d" & $json
May 19, 20178 yr If you take that piece of your code and put in the data viewer it will tell you what is wrong. Look at the output and compare it to what is required. Some quick ones: - you don't need the ampersand after the first -H - you don't add spaces between the different sections
May 19, 20178 yr "-H Authorization: ShippoToken " & $token & " -H Content-Type: application/json -d " & $json I believe above should make a valid string. Edited May 19, 20178 yr by ggt667
May 19, 20178 yr and if you want to keep it more readable and at the same know what options are supported in FM, you can use this: https://community.filemaker.com/docs/DOC-8177
Create an account or sign in to comment