rodland Posted February 3, 2016 Posted February 3, 2016 Hi anyone has any advice, I need to create a record (since FM) in a DB Airtable (ideal use a function ScriptMaster). Airtable publishes ws to Create Record (curl and js) use library groovy wslite, I try with : -> header{'Authorization:Bearer key***************'} -> header{Authorization('Bearer key***************')} -> header{'Authorization':'Bearer key***************'} -> header{'api_key=key***************'} -> header{'api_key=Bearer key***************'} -> header{Authorization('Bearer key***************')} MESSAGE ERROR !! ________________________________________________ wslite.soap.SOAPClientException: 401 Unauthorized Parameters: wsdl=https://api.airtable.com/v0/appscSNuNhEFXmAc9/bdair, fecha=2016-02-28, fechahora=2016-02-01T04:30:00.000Z, in=abc, d=18, out=xyz, response=<inicio>we</inicio> ________________________________________________________ anyone know how must be authorization data? Regards rodlan
Caleb360Works Posted February 4, 2016 Posted February 4, 2016 The AirTable API requires authorization as a header, not a SOAP header. You call it in the parameter list for client.send, like so: def response = client.send(SOAPAction:'...example',headers:["Authorization":"Bearer APIKEY"]) { } 1
rodland Posted February 4, 2016 Author Posted February 4, 2016 23 hours ago, rodland said: thank you very much ... Caleb360Works, the error disappears. after sending my first message,I had tried to do validation using RESTClient using: import wslite.http.auth.* client.authorization = new HTTPBasicAuthorization('Authorization','Bearer key...........') Apparently it would also be valid. Question: how serious the syntax in the Script zone (ScriptMaster) of the next structure ? ____________________________________________________________________ considering ... AIRTABLE (JS) base('namBDairtable').create({ "nameparameter1": "valueParameter1", "nameparameter2": "valueParameter2", "nameparameter3": "valueParameter3", "nameparameter4": "valueParameter4", "nameparameter5": "valueParameter5", "nameparameter6": "valueParameter6" } and AIRTABLE (CURL) '{ "fields”: { "nameparameter1": "valueParameter1”, "nameparameter2": "valueParameter2”, "nameparameter3": "valueParameter3”, "nameparameter4": "valueParameter4”, "nameparameter5": "valueParameter5”, "nameparameter6": "valueParameter6” } }' ____________________________________________________________ previously used this structure to pass parameters to a post, this not run in this case. body { name{[ nameparameter1(valueParameter1), nameparameter2(valueParameter2), nameparameter3(valueParameter3) ]} nameparameter4(valueParameter4) nameparameter5(valueParameter5) } _______________________________________________________________ ... or where I can read about script master syntax. '-> " : -> = array -> name array {[name1 (value1) name2 (vale2) ... etc]} fields -> nameField: ...etc. again thank you very much Caleb360Works Regards rodland 23 hours ago, rodland said: Regards rodlan
Recommended Posts
This topic is 3557 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