nesor Posted May 19, 2017 Posted May 19, 2017 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
Wim Decorte Posted May 19, 2017 Posted May 19, 2017 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 1
ggt667 Posted May 19, 2017 Posted May 19, 2017 (edited) "-H Authorization: ShippoToken " & $token & " -H Content-Type: application/json -d " & $json I believe above should make a valid string. Edited May 19, 2017 by ggt667 1
Wim Decorte Posted May 19, 2017 Posted May 19, 2017 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
Recommended Posts
This topic is 2812 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now