Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Steva Blazin
    @JazakVoda
    hi
    Vishal Rana
    @vishr
    hi
    Steva Blazin
    @JazakVoda
    how can i get JSON data from LabStack?
    dont know where to put my api key..
    curl \
    -X GET https://api.labstack.com/currency/rates?base=USD
    -H 'Authorization: Bearer <API_KEY>'
    and ym api key is
    can you help me pls?
    Vishal Rana
    @vishr
    don’t put your api key in the chat, it is like a password
    Steva Blazin
    @JazakVoda
    I now, this is just for the test, i will make new for my project
    Vishal Rana
    @vishr
    which language are you using?
    Steva Blazin
    @JazakVoda
    JavaScript
    Vishal Rana
    @vishr
    on the browser?
    Steva Blazin
    @JazakVoda
    yy
    i want to take data with Fetch() function
    but i dont know how to get JSON from the LabStack
    Vishal Rana
    @vishr
    First off, using api key on the browser will expose it to public
    and currently we don’t have any api key restrictions… possibly in future
    Steva Blazin
    @JazakVoda
    so i cant get somethin like this
    ?
    Vishal Rana
    @vishr
    what error are you getting?
    Steva Blazin
    @JazakVoda
    i need to put api key somewhere but i dont know where..
    Vishal Rana
    @vishr
    how are you calling the api?
    Steva Blazin
    @JazakVoda
    {"message":"missing key in request header"}
    i got this message
    Vishal Rana
    @vishr
    put your api key in the header
    while making a request
    show me the code to make this call
    Steva Blazin
    @JazakVoda

    document.getElementById('weather').addEventListener('click', getWeather);

    function getWeather(){
    fetch('https://api.openweathermap.org/data/2.5/weather?lat=45.267136&lon=19.833549&APPID=c470d9117220df245654821524d1b0c2&units=metric')
    .then((res) => res.json())
    .then((data) => {
    var output = '';
    output += `
    <div class=" card-body weather">
    <h2>${data.name}</h2>
    <img src="http://openweathermap.org/img/w/${data.weather[0].icon}.png" class="weather-img">
    <p class="weather-description">${data.weather[0].description.toUpperCase()}<p>

              <p>Temp: <span class="bold">${data.main.temp}c</span></p>
              <p>Temp-max: <span class="bold">${data.main.temp_max}c</span></p>
              <p>Temp-min: <span class="bold">${data.main.temp_min}c</span></p>
              <p>Wind-speed: <span class="bold">${data.wind.speed}m/s</span></p>
            </div>
          `;
        document.getElementById('show-weather').innerHTML = output;
    })

    }
    This i sfor weather, no i need same as that but for exchange list

    I need somewhere in the ulr to put my api key.. i think..
    but i dont know where
    Vishal Rana
    @vishr
    Something like below
    var myInit = { method: 'GET',
                   headers: {'Bearer: <API_KEY>'}};
    
    var myRequest = new Request('/URL', myInit);
    
    fetch(myRequest).then(function(response) {
    Steva Blazin
    @JazakVoda
    ty, i will try!
    ADYA07
    @ADYA07
    Hello
    How can i reserve a subdomain for connecting to my raspberry pi remotely using labstack?
    Vishal Rana
    @vishr
    We are still working on that feature, but you are able to get a randomly generated url?
    svArtist
    @svArtist
    Hi!
    I keep getting the "secure connection failed" error (https://forum.labstack.com/t/tunnel-server-url-secure-connection-failed/719) - is his going to be fixed any time soon? Or is there something wrong with my config?
    amanagoli
    @amanagoli
    Hi,
    Does labstack screenshot API supports URL redirects?