Hi @95pz_aru - welcome to the Infura community! When I try to replicate the error with your project id above, I get an error message that user project is inactive.
I would suggest creating a new project with a new project ID, and then following the curl example from our docs - try putting the URL just after curl.
I would triple check that the project ID you’ve included is correct. If you’re still getting the error, I would recommend creating a new project ID and starting from there, as the curl request is properly set up.
Hi Leiya, thanks for the quick response!
I did exactly that. I’ve created 3 different projects now, and very carefully copied/pasted/checked the ID. None of them have worked. Here is the latest one:
I’m having the same issue and am using the copy button on the project settings page so there’s no way it’s being entered incorrectly. I tried this with multiple projects and networks with the same result.
$ curl https://ropsten.infura.io/v3/<project-id> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1}'
invalid project id
I am running a ETH2 node and using infura. I started to receive a similar error (temporarily).
There are some other people having similar issues at that time.
time="2020-12-10 15:01:09" level= **error** msg="could not query header with height 11423531: 401
Unauthorized: invalid project id
time="2020-12-10 15:01:22" level= **error** msg="401 Unauthorized: invalid project id
time="2020-12-10 15:10:56" level= **error** msg="could not query header with height 11423577: 401
Unauthorized: invalid project id
But it seems like a temporary issue (it was running without any issue since 10 days)
In order to get information back from the request, we need to send over exactly what we’re trying to get from our request, in other words, the method we’re trying to use. The Ethereum API uses JSON, which is why we need to send over our requests in that format.
404 page not found
curl: (6) Could not resolve host: -X
curl: (6) Could not resolve host: POST
curl: (6) Could not resolve host: -H
curl: (3) Port number ended with ' '
curl: (6) Could not resolve host: -d
curl: (3) [globbing] nested brace in column 55
With this one
curl https://rinkeby.infura.io/v3/<PROJECT-ID> -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params": [],"id":1}
I got invalid project id too
and I cannot use it in my code. Because I am doing in this way:
Hi @festusowumi, and welcome to the Infura community!
When you’re getting that error, do you have your project ID included at the end of that URL? That is necessary to send requests.