Announcement

Collapse
No announcement yet.

API Key - How to pass into Browser address bar?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • API Key - How to pass into Browser address bar?

    Hi,

    I am in the process of developing an Android Mobile phone application and would like to test the URL which I imbed in the app,

    I have read the Developer documentation, including https://docs.espocrm.com/development/api-client-java/ however methods to query directly via the browser is not covered, also need to extroplate how to transpose and use the provided Java example into the "Android Studio IDE" and coding methods, which perfer the Kotlin language.

    I have an internal development Apache WEB server running on Ubuntu Linux headless server. I have set up a self signed SSL Cert.

    I have tried to use the following in the Google Chrome address bar on a second pc to test the access and response from my ESPOcrm on my internal server,

    "https://192.168.0.xxx/espocrm/api/v1/account?X-Api-Key=MyApiKeyHere "
    (I have tried many variants of this eg: api_key=xxx etc)

    The browser still requests a Username and password before alllowing a respose with the json data from the database.

    I have set up an API User and Api Role in ESPOcrm, I presume that should mean I should not be prompted for login credentials when using the API Key?

    Is my syntax incorrect or does the Esocrm API not allow passing of the API key via the browser address bar?



    regards,
    Vik
    Last edited by Vikscripts; 11-15-2021, 09:30 AM. Reason: More detail

  • #2
    Hi Vik,

    X-Api-Key should be passed in headers.

    Comment


    • #3
      Hi Yuri,

      Thank you for the reply,
      Is there any way to pass the API Key via a browser address bar ?

      Comment


      • espcrm
        espcrm commented
        Editing a comment
        Not by default, you would need to write a new code for that... as for how difficult it will be is another question.
        Last edited by espcrm; 11-16-2021, 11:28 PM.

    • #4
      Hi espcrm,
      Thanks for the input,
      there seems to be some text missing from your comment - can I ask , write a new what ?

      Comment


      • espcrm
        espcrm commented
        Editing a comment
        Hi Vik, "new code" would be what I wanted to write. I edit the post now.
        Last edited by espcrm; 11-19-2021, 05:28 AM.

    • #5
      OK, Thank You

      Comment

      Working...
      X