Error: error setting up project: api key format error: invalid api key format

When creating the bucket generates this error.

What is the solution?

Hello and welcome to the forum!

Can you try creating a new API key and running the setup again? Be sure to copy the whole API key and paste :slight_smile:

1 Like

Some times when you copy, it also copy aditional space with it, in the end.

I had the same issue, in the uplink setup it should trim whitespace

I hate to resurrect a “solved” issue, but I get this error still after running setup multiple times with multiple API Keys, making sure there was no white space at the end any time I try to run any command. It essentially renders the gateway useless. I can start the gateway after setup but that is about it. Anybody have any other ideas? Thanks so much!

1 Like

Hello @Lazydayz137,
Welcome to the forum!

Do you use the Powershell? If so, please, copy the API key line by line. Sometimes the Powershell inserts carriage return to the line at the border of the window and can copy it to the buffer. You can easily check that behavior - paste the copied key to the text editor, it should be one line.

If you use the API key from the browser, make sure that you do not use any ad blockers and other extensions in your browser which could break the content.
Also, make sure that you use the latest version of the gateway/uplink.

Still doesn’t work for me :cry: - even though I’ve copied and pasted the API key one part by one part and downloaded the latest Windows binary exe file.

Has someone encountered same problem and managed to solve it?

Ok I somehow solved it myself - first I delete the existing data that storj saved on my Windows, specifically I delete the folder in Users[your username]\AppData\Roaming\Storj

And then during the setup process, I only use characters in lowercase for my access name this time and then it works for me.
Hopefully anyone who sees this could replicate it yourself.