Interact with Pocket APIs

Hi Node-RED forums.

I'm an avid User of Pocket.
I want to interact (and specifically, retrieve) the data from my pocket account.

I've created an app and received a consumer key.

I've been following this call and created this flow, but I'm receiving `"non-http transport requested" as an error.

Here's my flow.
I really need to clarify myself how to use and interact with headers, specifically woth the change node, rather than the function node.

Thanks in advance for the help.

[{"id":"4ade6f69.0f7db","type":"http request","z":"967d56b4.c7f498","name":"pocket request APIs","method":"POST","ret":"obj","paytoqs":"ignore","url":" https://getpocket.com/v3/oauth/request ","tls":"","persist":false,"proxy":"","authType":"","x":560,"y":4600,"wires":[["d19b405.3e9f5c"]]},{"id":"692f12fb.ec970c","type":"change","z":"967d56b4.c7f498","name":"set payload and headers","rules":[{"t":"set","p":"headers","pt":"msg","to":"{\"Content-Type\":\"Application/json; charset=UTF8\",\"X-Accept\":\"application/x-www-form-urlencoded\"}","tot":"json"},{"t":"set","p":"headers","pt":"msg","to":"{\"consumer_key\":\"MyKey\",\"redirect_uri\":\"http://google.com\"}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":4640,"wires":[["4ade6f69.0f7db","f70ce42e.dfb5b8"]]},{"id":"5632bad4.b682e4","type":"inject","z":"967d56b4.c7f498","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":100,"y":4620,"wires":[["fbba97fb.d0da48"]]},{"id":"f70ce42e.dfb5b8","type":"http request","z":"967d56b4.c7f498","name":"httpbin","method":"POST","ret":"obj","paytoqs":"ignore","url":"https://httpbin.org/post","tls":"","persist":false,"proxy":"","authType":"","x":570,"y":4640,"wires":[["d19b405.3e9f5c"]]},{"id":"d19b405.3e9f5c","type":"debug","z":"967d56b4.c7f498","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":770,"y":4600,"wires":[]},{"id":"fbba97fb.d0da48","type":"change","z":"967d56b4.c7f498","name":"set payload and headers","rules":[{"t":"set","p":"headers","pt":"msg","to":"{\"Content-Type\":\"Application/json; charset=UTF8\",\"X-Accept\":\"application/json\"}","tot":"json"},{"t":"set","p":"headers","pt":"msg","to":"{\"consumer_key\":\"MyKey\",\"redirect_uri\":\"http://google.com\"}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":4600,"wires":[["4ade6f69.0f7db","f70ce42e.dfb5b8"]]}]

Have you tried the Pocket node for Node Red?

node-red-contrib-pocket-api

yes.
I'ts not working to me.
but maybe somebody was more successfull.

I'm more interested in make a flow that is doing that, because I'm really in need to understand how to interact with these custom apis.

(I will try again it anyway)

In your change node why are you creating / setting two msg.headers.
Wouldnt the second replace the first ?

Try to merge the headers in one entry.

I have no idea about this Pocket API but from its Documentation i believe its also required to supply an access_token

image

good point.
I'll come back to this later.
The access token is given and temporary, You have to request it.

To begin the Pocket authorization process, your application must obtain a request token from our servers by making a POST request.