Open extra topbar

JSON-API authentication

I reply to all queries on the forums and via email, once per day, Monday to Friday (not weekends).

If you are new here, please see some information on how to ask for support. Thank you!

JSON-API authentication

dashed-slug.net Forums General discussion JSON-API authentication

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #9240
    d3vnu77
    Participant

    We are attempting to build an app wallet with your API and are trying to login and receive a token using the following plugin:

    JWT Authentication for WP REST API

    We are having trouble getting past anything that requires authentication.

    Can you take a look at the screenshot and give me an idea on what we need to do?

    Attachments:
    You must be logged in to view attached files.
    #9244
    alexg
    Keymaster

    Hello,

    The plugin you mentioned is for giving you access to the WP RESTful API.

    Current versions of Bitcoin and Altcoin Wallets implement the JSON-API with custom code, not via the WP REST API.

    You should follow the instructions given in the manual, under “APIs, APIs everywhere!” -> “Wallets JSON API” -> “Programmatic access to the Transactions API”. You can get the manual in PDF form if you get the bundle download of the plugin from this website. The trick is to pass the user-specific key via the __wallets_api_key GET parameter, or via a bearer authorization HTTP header. Examples using curl are given in the documentation.

    P.S. As a sidenote, I am currently developing Bitcoin and Altcoin Wallets 6.0.0, which is a complete rewrite of all the code of the plugin and its extensions and adapters. This is an effort that will take several months and will upgrade many aspects of the software suite. One such improvement is that the WP REST API will be used instead of the current JSON-API. When this is out, I will make every effort to provide backwards compatibility via a JSON-API that will be marked as deprecated and will be compatible with version 3 of the current API. Therefore you will not face any unpleasant surprises regarding the app you are building. In any case, I will blog about wallets 6 at a later date, which may be several months into the future. Watch for the release notes of wallets 6, when they become available, before upgrading to this major version of the plugin, because if there is any migration instructions I will make sure to discuss them on the blog. There will be announcements on Facebook, Twitter, the blog, and the RSS feed.

    with regards

    #9310
    d3vnu77
    Participant

    Hi, please you mentioned something like “user-specific key”, can that be gotten from the jwt authentication or is there another way of getting the user key?

    #9311
    alexg
    Keymaster

    Hello,

    To get the JSON-API key remotely, it is necessary to have the user name and password of the user.

    To see how to get the API key, please see the following section in the documentation:

    “APIs, APIs everywhere!” -> “Wallets JSON API” -> “Programmatic access to the Transactions API” -> “Getting a key”

    The documentation showcases how to do this from the shell using curl. You can do this using your language of choice, as long as you can hold cookies between requests.

    with regards

    #9337
    d3vnu77
    Participant

    the authentication is not working in react native and postman but i figured another method to approach the authentication, thanks anyways….
    I have another question: please where/how can i get the QR Code, that’s which api holds the QR Code?

    #9338
    d3vnu77
    Participant

    i think i found the solution for the QR Code, will get back to you if it didnt work, thanks.

    #9341
    alexg
    Keymaster

    Hello,

    About authentication, it’s not about which library or framework you use. It’s about holding cookies between your curl sessions. Glad you figured it out.

    The QR code simply displays the deposit address for each coin. You can get those with the get_coins_info JSON-API call. You will need to use a qr code rendering library to create the qr code image from the address.

    with regards

    #9356
    d3vnu77
    Participant

    Yea i used a library for the QR Code, thanks for your reply anyways.

    #9357
    d3vnu77
    Participant

    Please sir, this endpoint /wallets/api3/get_transactions/SYMBOL/COUNT/FROM is not displaying my transactions

    #9358
    d3vnu77
    Participant

    Sorry i have fixed it, i was doing /wallets/api3/get_transactions/BTC/3/3 not knowing that i added 3 as offset (that’s where to start from) and i dont have upto three transactions

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.