My graphebedb_url is gotten from heroku to access my neo4j database online. It is correct but when I initiate db connection. It returns error 403.which is forbidden request.
2 Answers
I'm founder & CEO of GrapheneDB. philippkueng/node-neo4j supports authentication via URL.
According to the project's readme, the snippet should look like this. I've adjusted it to load the connection URI from the env variable:
var neo4j = require('node-neo4j');
db = new neo4j(process.env['GRAPHENEDB_URL']);
Attention: The latests release of the driver is 9 months old, so it might not be compatible with the latests versions of Neo4j. This is not related to your authentication issue though.
For an up-to-date nodejs driver I'd recommend thingdom/node-neo4j

- 1,941
- 12
- 14
-
Problem still persist – Oladapo Adebowale Nov 01 '15 at 17:36
-
db = new neo4j('app******:ykhHLRBlEMuPPVPu5vL3@app******.sb02.stations.graphenedb.com:******'); // This is how I am doing it and when I change to db = new neo4j(process.env['app******:ykhHLRBlEMuPPVPu5vL3@app******.sb02.stations.graphenedb.com:******']); // problem still persist – Oladapo Adebowale Nov 01 '15 at 17:50
-
Hello @OladapoAdebowale. The protocol (http://) is missing in your code. This would not fail if you would load the connection URI from the env variable. Also, you've obscured your Heroku app ID rather than your database token. Database tokens, usernames, passwords, etc. should never be published on the internet. There is an app ID in another comment but it looks fake, I hope the token is fake too? – albertoperdomo Nov 01 '15 at 18:27
-
So what do you suggest I do. The http:// was added. Do you think the graphenedb_url I got from heroku configuration is not the real one. – Oladapo Adebowale Nov 01 '15 at 19:29
-
Please open a support ticket so that we can look at it in more detail. There is clearly something wrong in the connection if you are getting a 403 but it's hard to track down here without the more detailed info. – albertoperdomo Nov 03 '15 at 00:14
-
My Heroku app id is app43095527 – Oladapo Adebowale Nov 03 '15 at 17:51
-
Turned out to be a typo in the connection string. Solved. – albertoperdomo Nov 05 '15 at 10:36
-
A typo, I can't locate it. Where – Oladapo Adebowale Nov 05 '15 at 22:38
-
As our support team already told you in the ticket, there was an error in one of the characters of the password, which was lower case instead of upper case. We've reset the access token anyway for security reasons (if you make it public, you are granting read/write access to anyone who reads your question). You should copy it again from Heroku or ideally grab it directly from the config variable. – albertoperdomo Nov 06 '15 at 00:58
-
Thank you very much Alberto, the new password makes it work. Thank you man Thank you Graphenedb Thank you Heroku and also to every of the support team that helped me out on this. Also Brian, Im grateful for the assistance. God bless Alberto God bless Graphenedb. – Oladapo Adebowale Nov 06 '15 at 02:00
Can you describe what you've tried?
Perhaps you need the username and password? Your driver might not support the username and password as part of the URL. You might need to specify it separately (keep in mind there are two node-neo4j
drivers when looking at documentation)
Also, ideally you should be using the Heroku environment variable rather than hardcoding the URL.

- 10,746
- 1
- 22
- 34
-
I'm using node-neo4j. And I when I test using localhost:7474 I passed neo4j:mypassword@localhost:7474 and it worked but when i'm trying to use graphenedb the url looks like this app45353535:sdddgt3434c645e5@app45353535:dodgers.fd54f4444d:35454 but it returns error 403 but when I take all the parameters after the @ and paste on the browser, it takes me to the neo4j db – Oladapo Adebowale Nov 01 '15 at 09:30
-
-
db = new neo4j('http://app******:ykhHLRBlEMuPPVPu5vL3@app******.sb02.stations.graphenedb.com:******'); // This is how I am doing it – Oladapo Adebowale Nov 01 '15 at 17:49