<p>I was able to get the POST working. The error you're getting back seems to indicate the key "addrs" is not in the POST payload. Just a guess, but maybe you don't need the quotes and spaces around the payload?</p>

<p>Screenshot here:</p>

<p><a href="https://i.sstatic.net/oFJSa.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/oFJSa.png" alt="enter image description here"></a></p>

CC BY-SA 3.0
2015-11-08T05:04:51.637Z
[Very close!](http://m.imgur.com/OjBDrMe). It was the spaces between the `=` causing the issue. The payload must be a string without any spaces, ie, `addrs=2NF2baYuJAkCKo5onjUKEPdARQkZ6SYyKd5,2NAre8sX2povnjy4aeiHKeEh97Qhn97tB1f`
Wizard Of Ozzie
CC BY-SA 3.0
2015-11-07T20:35:49.747Z
2015-11-07T20:35:49.747Z
Jimmy Song
<p>I'm trying to write Python code which utilises the (Insight) <a href="https://blockexplorer.com/api" rel="nofollow noreferrer">Blockexplorer.com API </a>, particularly the <code>POST</code> functions. I'm testing using the iOS REST app, <em><a href="http://appcrawlr.com/ios/restler" rel="nofollow noreferrer">Restler</a></em> (see <a href="https://i.sstatic.net/4zKBa.jpg" rel="nofollow noreferrer">screenshot</a>).</p>

<p>The call I'm trying to make is fine when I use <em>GET</em> (<a href="https://testnet.blockexplorer.com/api/addrs/2NF2baYuJAkCKo5onjUKEPdARQkZ6SYyKd5,2NAre8sX2povnjy4aeiHKeEh97Qhn97tB1f/txs" rel="nofollow noreferrer">https://testnet.blockexplorer.com/api/addrs/2NF2baYuJAkCKo5onjUKEPdARQkZ6SYyKd5,2NAre8sX2povnjy4aeiHKeEh97Qhn97tB1f/txs</a>), however for <code>POST</code>, I'm having problems. I use <code>"addrs" = "2NF2baYuJAkCKo5onjUKEPdARQkZ6SYyKd5,2NAre8sX2povnjy4aeiHKeEh97Qhn97tB1f"</code> as my params (and have tried using dumped JSON, ie<code>"{ "2NF2baYuJAkCKo5onjUKEPdARQkZ6SYyKd5,2NAre8sX2povnjy4aeiHKeEh97Qhn97tB1f" }"</code>, but I'm always getting the following error message:</p>

<blockquote>
  <p>Invalid addrs param:Cannot call method 'split' of undefined. Code:1</p>
</blockquote>

<p>It's clearly a parameters issue, so what gives? (FWIW I'm <em>not</em> versed in JavaScript)</p>

<hr>

<p>Relevant screenshot of <em>Restler</em> (L) and API documentation (R):</p>

<p><a href="https://i.sstatic.net/QEeha.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/QEeha.jpg" alt="Screenshot"></a></p>

<development><api><blockexplorer>
Blockexplorer.com API POST error
Wizard Of Ozzie
# Blockexplorer.com API POST error

(Asked by: username_0 on 2015-11-07)

I'm trying to write Python code which utilises the (Insight) [Blockexplorer.com API](https://blockexplorer.com/api) , particularly the `POST` functions. I'm testing using the iOS REST app, *[Restler](http://appcrawlr.com/ios/restler)* (see [screenshot](https://i.sstatic.net/4zKBa.jpg)).

The call I'm trying to make is fine when I use *GET* (<https://testnet.blockexplorer.com/api/addrs/2NF2baYuJAkCKo5onjUKEPdARQkZ6SYyKd5,2NAre8sX2povnjy4aeiHKeEh97Qhn97tB1f/txs>), however for `POST`, I'm having problems. I use `"addrs" = "2NF2baYuJAkCKo5onjUKEPdARQkZ6SYyKd5,2NAre8sX2povnjy4aeiHKeEh97Qhn97tB1f"` as my params (and have tried using dumped JSON, ie`"{ "2NF2baYuJAkCKo5onjUKEPdARQkZ6SYyKd5,2NAre8sX2povnjy4aeiHKeEh97Qhn97tB1f" }"`, but I'm always getting the following error message:

> Invalid addrs param:Cannot call method 'split' of undefined. Code:1

It's clearly a parameters issue, so what gives? (FWIW I'm *not* versed in JavaScript)

---

Relevant screenshot of *Restler* (L) and API documentation (R):

[![Screenshot](https://i.sstatic.net/QEeha.jpg)](https://i.sstatic.net/QEeha.jpg)

**Tags:** development, api, blockexplorer


---

## 1 answers

### Answer by username_1 on 2015-11-07. Score: 1 | Accepted answer

I was able to get the POST working. The error you're getting back seems to indicate the key "addrs" is not in the POST payload. Just a guess, but maybe you don't need the quotes and spaces around the payload?

Screenshot here:

[![enter image description here](https://i.sstatic.net/oFJSa.png)](https://i.sstatic.net/oFJSa.png)

> **Comments:**
> **username_0**: [Very close!](http://m.imgur.com/OjBDrMe). It was the spaces between the `=` causing the issue. The payload must be a string without any spaces, ie, `addrs=2NF2baYuJAkCKo5onjUKEPdARQkZ6SYyKd5,2NAre8sX2povnjy4aeiHKeEh97Qhn97tB1f`  

---

