API Reference

From Bitmessage Wiki
Revision as of 22:01, 18 March 2013 by Atheros (talk | contribs) (Created page with "=== Enable the API === To enable the API, copy and paste these lines into the bitmessagesettings section of the keys.dat file: <pre> apienabled = true apiport = 8442 apiinterf...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Enable the API

To enable the API, copy and paste these lines into the bitmessagesettings section of the keys.dat file:

apienabled = true
apiport = 8442
apiinterface = 127.0.0.1
apiusername = bradley
apipassword = yourSuperWonderfulPassword98a8#5223345

List of Operations

Required arguments are denoted inside < and >

Command Parameters Description
listAddresses Lists all addresses shown on the Your Identities tab. Returns a list of objects with these properties:
  • label
  • address
  • stream
  • enabled
createRandomAddress <eighteenByteRipe> <label> Creates one address using the random number generator. Supply a boolean telling Bitmessage whether to generate an address with an 18 byte ripe (as opposed to a 19 byte ripe). This is the same setting as the "Do extra work to make the address 1 or 2 characters shorter" in the user interface. Using False is recommended if you are running some sort of website and will be generating a lot of addresses.

Returns the address.

createDeterministicAddresses <passphrase> <addressVersionNumber> <streamNumber> <numberOfAddresses> <eighteenByteRipe> Similar to the createRandomAddress except that you may generate many addresses in one go. Returns a list of new addresses.
getAllInboxMessages Does not include the messages in the trash. Returns a list of objects with these properties:
  • msgid
  • toaddress
  • fromaddress
  • subject
  • message
  • encodingtype
  • receivedtime