Results 1 to 3 of 3
  1. #1

    Question No local usage of Trackbase API?

    Hello folks,

    I currently fiddle with the Trackbase API in general. I've created an account and an application (thus got the relation token and the AKK) and wanted to try it. Unfortunately, I get this error message:

    Code:
    Wrong server url or no access to API.
    Since I'm developing a website on my local machine, this sounds like I'm unable to use the API as the request's IP address is checked against the hostname entered in the application.

    Can this situation be solved somehow without needing a publicly available server and may I ask why the check for the server is necessary as I have to provide several tokens already anyway?

    BTW, returning the status code "200" for an invalid request is kinda misleading

  2. #2
    Manager JoNny's Avatar
    Join Date
    Mar 2011
    Replies
    1,433
    Country
    Germany
    Xfire
    dssjonny
    Steam
    dssjonny
    Discord
    JoNny#4432
    Clan
    -TB#
    Quote Originally Posted by Gulaschkanone View Post
    Hello folks,

    I currently fiddle with the Trackbase API in general. I've created an account and an application (thus got the relation token and the AKK) and wanted to try it. Unfortunately, I get this error message:

    Code:
    Wrong server url or no access to API.
    Since I'm developing a website on my local machine, this sounds like I'm unable to use the API as the request's IP address is checked against the hostname entered in the application.

    Can this situation be solved somehow without needing a publicly available server and may I ask why the check for the server is necessary as I have to provide several tokens already anyway?

    BTW, returning the status code "200" for an invalid request is kinda misleading
    Dear Gulaschkanone,

    Thanks for testing our API and asking your questions on this forum.
    The TrackBase API can be called from any server or client, no matter the availability or connection.

    Therefore, you can use your local machine or development environment as the server address. Please note that it obviously needs to be resolvable by a remote server (TrackBase). Therefore, domains that are not resolvable through public DNS servers are not reachable. Please use your local IP address instead, so TrackBase can track down if the request is coming from that server/machine. Make sure to use http://YO.UR.I.P./ as the format.
    The server address needs to be callable only for apps fetching user information.

    Also, returning the status code 200 is correct and considered best practice. The request to the API itself was OK and successful. If the request cannot be interpreted or is not holding sufficient information is checked during runtime and returned in the return JSON.

    If there's anything else I can help you with, feel free to ask.
    Also, if you are running PHP on your machine, you can use our package via composer (composer require trackbasenet/dev-api).

    /JoNny

  3. #3
    Hello JoNny,

    thank you for your response. Sometimes, some solutions seem too obvious.
    Using my IP address indeed solved the issue.

    Kind regards
    Gulaschkanone

Posting Permissions