URL Headers

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
hrcap
Posts: 131
Joined: Mon Jan 14, 2019 5:20 pm

URL Headers

Post by hrcap » Sun Feb 05, 2023 7:10 pm

Hi All

I hope that everyone is well.

I am searching linking a Starling Bank Account to Livecode.

I need to set the URL headers but I can't get this to work... it keeps coming back and saying I haven't set the 'authorization' in the headers any assistance would be appreciated.


PS
I have also attached a screenshot of the API format


Many Thanks

Code: Select all


on mouseup
   
   put "Accept: application/json" & return & \
         "Content-Type: application/json" & return & \
         "Authorization: bearer eyJhbGciOiJQUzI1NiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAA_31Uy5KbMBD8lS3Oqy0wb2655QfyAcNosFUWEiUJb7ZS-fcIJIzxunJzd8-jRzP4TyKsTboEJsE4jfrDOjBSqHMP6vqBekzeEzv3PoKwgr7CnA1pk7OiAGRNmQKDvE0r4hz9Dx9Mv6eky6q6rNOiqfP3RIALRJU1xUIAop6V-6klJ_NLcF_7lOc1r_KUNVUOrKC-ZH3pGyCWZV1knGd56Ws7fSUVM7KemroYWIWnhhVtCaxJT4P31fCqads6rU8-w4_1A5GsDVlV05Q1p8H3yUpWYF6xhsqCFWU7ZFQMbdFWy8CoJ1oeJThlKLUl3hkC_rZxl9U-UzDSS8F9TU-C4KScGASZIy-FdQcmAs6NN94RF-4OguIc4GWke-SOP41w9Aazu2gjrF8jE4qLm-AzyBDcgwSF0RqC4Qy1ckbL0GhhoqbVIMwITmjF9MCGWXF7l-y9-wZCa5yt0-M2Io0gYmFJ3og6dzBN8uuO1qgRFAdHHSdJvsQGo2au5JZBJkMDGfLe7f-kYCNokwQk_wKOzmad4zHxuxhTyeAFtulGcuDdQIcermrE61ATfBFtUgBxiAD2ICZGOMeZIuE7G7WtJcQ_yM6AsoC7a0-zfpbXbtsu7dTuIODdRMBbgeVG_L2Nwu01pUZv4qHCSjC9HMkzG7OMHoTcRgozHqg1yhCSmNwB2KMUHnxdngEZRQs3v1PLznq3deDicAfuW2Z4P1_4VYldfFFrF0NRvBCfJXEW3y_S5Jyfd54inGD7pvwf6HrbTBv-0P7Ibn2P7It8pj_VnXe0LhDt7Zma-BCpubdo_OMud7N1eeTWqMfjWvf3fG3J3399q69qGQYAAA.BYFPFlbCQxNcVEoZyqv0iKLIIYl3ShQElPuebZpIJfSYCb82ef8Sdk1x7jMDr41OPtOfDHoeBJLYdk60vux8yBaC0YZAlPZneqPrLkhvZSQP7PK-rUHaPxr0Eb34R247rogo4WAHzq0ZXnzzEnSgMfaoejvcJjkt7NVitYavqLUZh31fp_Ud9mkX29afWIbmO6-IXr6ydi5xJ0-ZVAnd8vAOFdYrF5kqyJPoZT3ln2awlqT3fAnh4BTkrZRs00zYhtC-O_9tkSOWN1C0yDupZ5VGBAx3v2WlNRnmSEkx-1546MO0i8ZNZdcqeZqEoWZ6zRJj0htP0oGW688Efqn08JIi0pw4uX2lw3vq4X-4tx8JRmjkHuTjAyNq6K8dG61eyHkgGECkoj0GBpCSR2Be4uqbbvhpqF-AJC3FRNto2fvt6ZzrTw2aM3lSxqI7t-sXQ_92HLUYB9AIgKmDhVyhigIHcnB46q6_g2zMYLhckwlxirfp71RR91Fj4qUnsmJNPwSnpHyAwg54dwc7GkG9vLCz3tFIEw6X7fYp24ioKEAslr1ypgXAbPvww-7MAPUGDCCnrgc0pNYhO4Ni1A_hVaI18N2uhzHG20X0V6N7bECrtcTmksdN8DjHyco06Hv5Q7er2r0yTVOOT-AUUfpiPcvf9FZxQDO9BfPQ92aOkK4" & \
         "" into t_url_headers
   
   
   
   put "https://api-sandbox.starlingbank.com/api/v2/accounts" into t_path
   
   
   
   set the httpHeaders to t_url_headers
   put url t_path into t_response
   put the result into t_message
   
   breakpoint
end mouseup


Attachments
API Screenshot.jpg

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”