Using the READ API, you can Read Public and Private bins.

Root
https://api.jsonbin.io/
Route (READ a specific Bin)
/b/<BIN_ID>
Route (READ a specific Bin Version)
/b/<BIN_ID>/<BIN_VERSION>
Route (READ the latest Record of a Bin)
/b/<BIN_ID>/latest        # Will always return the last Updated record
Request Type
GET
Request Headers
Header Value Required
secret-key <YOUR_SECRET_KEY> Optional
secret-key

secret-key is an optional header. It is required when you need to Read a Private record.

Basic Code Samples
curl --header "secret-key: <SECRET_KEY>" \
       --request GET \
       https://api.jsonbin.io/b/<BIN_ID>
let req = new XMLHttpRequest();

req.onreadystatechange = () => {
  if (req.readyState == XMLHttpRequest.DONE) {
    console.log(req.responseText);
  }
};

req.open("GET", "https://api.jsonbin.io/b/<BIN_ID>", true);
req.setRequestHeader("secret-key", "<SECRET_KEY>");
req.send();
import requests
url = 'https://api.jsonbin.io/b/<BIN_ID>'
headers = {'secret-key': '<SECRET_KEY>'}

req = requests.put(url, json=nil, headers=headers)
print(req.text)
require 'net/http'

uri = URI("https://api.jsonbin.io/b/<BIN_ID>")
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
  req = Net::HTTP::Put.new(uri)
  req['secret-key'] = '<SECRET_KEY>'

  http.request(req)
end

puts res.body
Request Response
Success
200
{
  <YOUR_ACTUAL_BIN_DATA>
}
Error
422, 404, 401
{
  "message": "<ERROR_MESSAGE>",
  "success": false
}
Status Code Error Message
422 Unprocessible Entity
Invalid Bin ID

Fix: You need to pass a valid Bin ID in-order to Update a bin.

401 Unauthorized
Need to provide a secret-key to READ private bins

Fix: While Reading a Private record, you need to pass secret-key header to Read the Private record.

401 Unauthorized
Invalid secret key provided.

Fix: If you are trying to Read a Private record, ensure that the secret-key you are passing in the header is correct.

404 Not Found
Bin not found

Fix: Check your Bin ID and pass a Valid Bin ID.