List Access Keys API

Fetch a list of Access Keys created with Permission information for each API endpoint as well as metadata for each of the keys.

Root

https://api.jsonbin.io/v3 

Route

/a 

Request Type

GET

Request Headers

Below are the list of Accepted Request Headers if you are trying to Create a JSON record.

Request Header Value Required
X-Master-Key <API_KEY> Yes
X-Master-Key Required

X-Master-Key is nothing but your Core API Access Key. You will need this Key to access mostly any API end-point on JSONBin. You could find the key on the API Keys page.

Code Samples

  • cURL
  • JavaScript (ES6)
  • Python 3
  • Ruby
curl -v\
  -H "X-Master-Key: <YOUR_API_KEY>" 
  --request GET \
    https://api.jsonbin.io/v3/a
let req = new XMLHttpRequest();

req.onreadystatechange = () => {
  if (req.readyState == XMLHttpRequest.DONE) {
    console.log(req.responseText);
  }
};
  
req.open("GET", "https://api.jsonbin.io/v3/a", true);
req.setRequestHeader("X-Master-Key", "<YOUR_API_KEY>");
req.send();
import requests
url = 'https://api.jsonbin.io/v3/a'
headers = {
  'X-Master-Key': '<YOUR_API_KEY>'
}

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

uri = URI("https://api.jsonbin.io/v3/a")
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
  req = Net::HTTP::Get.new(uri)
  req['X-Master-Key'] = '<YOUR_API_KEY>'

  http.request(req)
end

puts res.body

Request Response

Success Status Code: 200
[
  {
    "keyPermissions": {
      "bins": {
        "update": false,
        "delete": false,
        "create": true,
        "read": true
      }
    },
    "accessKeyId": "<ACCESS_KEY_ID>",
    "accessKey": "<ACCESS_KEY>",
    "metadata": {
      "name": "<ACCESS_KEY_NAME>"
    }
  },
  ...
]
Error Status Code: 401, 403
{
  "message": "<Error Message>"
}

For more information on the error codes & errors you might possibly encounter, refer to the below section.

Error Reference

  • 401 Unauthorized
  • 403 Forbidden
You need to pass X-Master-Key in the header to fetch a list of Access Keys.

In-order to fetch a list of Access Keys, you need to pass the X-Master-Key header. You can find X-Master-Key on API Keys page

Invalid X-Master-Key provided

X-Master-Key which is passed is invalid. Verify it once on API Keys page

Requests exhausted. Buy additional requests at https://jsonbin.io/pricing

You'll encounter this error if you've consumed all the available requests. You can purchase additional requests.

Create a Free Account

Create an Account View Pricing