🔑 Key-based access to JSON API

in #wordpress5 years ago

Version 4.2.0 is a very special version for the Bitcoin and Altcoin Wallets WordPress plugin: The JSON API can now be accessed via a key. The JSON API is what allows a user to view their wallets, to query past transactions, and to initiate requests for new transactions.

Bitcoin and Altcoin Wallets WordPress plugin version 4.2.0.

This is mainly of interest to developers, as it makes programmatic access easier. Previously, it was not possible to access the JSON API without logging in to WordPress and storing cookies in memory or in a file. Now, it is possible to access the API via a key. The key can be passed as a GET parameter or, preferably, via an HTTP header.

The feature is disabled by default. To enable it for certain users, grant them the access_wallets_api capability. If you wish to do this for a user role, you may do so via the Capabilities menu under Wallets. A random key is assigned to each user with the necessary capability.

This authentication method is only available to JSON API version 3. Older versions of the API do not support this feature and can only be accessed with cookie-based authentication.

Users can view, and refresh, their API key via the [wallets_api_key] shortcode. Refreshing a key means that the old key is invalidated.

Additionally, the API key is shown in the user profile section. The key is shown only to the user, and to any admin with the manage_wallets capability.

To see more information and examples of how to use this feature, consult the accompanying documentation under APIsWalletsJSON APIProgrammatic access to the Transactions API.

Sort:  

Congratulations @dashed-slug.net! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.32
TRX 0.11
JST 0.034
BTC 66569.64
ETH 3235.92
USDT 1.00
SBD 4.31