json authentication
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
json authentication
Hi there,
I am trying to populate a widget via an online json file. I managed to do so when I used an "open" online json file, the problem comes when the official data I have to use has an authentication key. There is also a basic authentication with username and password, which also I can not figure out, but I was instructed to use the authentication key.
Any ideas?
thanks in advance
pajito
I am trying to populate a widget via an online json file. I managed to do so when I used an "open" online json file, the problem comes when the official data I have to use has an authentication key. There is also a basic authentication with username and password, which also I can not figure out, but I was instructed to use the authentication key.
Any ideas?
thanks in advance
pajito
Re: json authentication
Hi Pajito,
do you mean you're trying to log in with an online API that accepts and returns JSON?
I suspect you need to set the data in httpHeaders - if that's the case you should search the forum and the Dictionary for examples - there are a few in the forums.
If it's something else, can you clarify?
HTH
Stam
do you mean you're trying to log in with an online API that accepts and returns JSON?
I suspect you need to set the data in httpHeaders - if that's the case you should search the forum and the Dictionary for examples - there are a few in the forums.
If it's something else, can you clarify?
HTH
Stam
Re: json authentication
Hi and thanks for the reply,
yes i tried this approach but it didn't return any results. propably I use it wrong or something
yes i tried this approach but it didn't return any results. propably I use it wrong or something
-
- VIP Livecode Opensource Backer
- Posts: 10045
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: json authentication
What are the instructions for using the authentication key?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: json authentication
[/quote]
What are the instructions for using the authentication key?
[/quote]
hi, they just gave me a link which I can share
and an authentication key. There is a basic authentication mode but still doesn't seem to work
thanks
What are the instructions for using the authentication key?
[/quote]
hi, they just gave me a link which I can share
Code: Select all
https://www.myrace.gr/json/leaderboard?id=2146&m=5148
thanks
-
- VIP Livecode Opensource Backer
- Posts: 10045
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: json authentication
Did they provide any instructions on what you're expected to do with the authentication key? Does it go in the headers? Does it become a URL parameter? Any instructions at all?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: json authentication
Hi, yes the authentication goes to the headers. Bellow you can find the code I used with batch file and managed to dataFourthWorld wrote: ↑Tue Nov 08, 2022 3:12 amDid they provide any instructions on what you're expected to do with the authentication key? Does it go in the headers? Does it become a URL parameter? Any instructions at all?
Code: Select all
curl -H "authorization:abcdefgh" "https://www.myrace.gr/json/leaderboard?id=2146&m=5148"
Thank you
Re: json authentication
FourthWorld wrote: ↑Tue Nov 08, 2022 3:12 amDid they provide any instructions on what you're expected to do with the authentication key? Does it go in the headers? Does it become a URL parameter? Any instructions at all?
Also I was given the option of basic authentication as the administrator called it , which has a username and a password
-
- VIP Livecode Opensource Backer
- Posts: 10045
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: json authentication
Have you used Basic Auth before?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn