Cant upload a new library

I am on the stage to upload a new private library via CLI, but get an authorization error from CLI like this:
particle library upload
HTTP error 401 from - The access token provided is invalid.

How can I give CLI my token?

At the end I like to share the Pixy2-libs from

Are you logged into the cli? The token saved on your computer could be expired. Try logging in again.

particle login

worked! - Now the next step:

You are not the owner of this library

I think it will be noticed that this is not the identical email address specified in the properties. Actually, I’m not the publisher of Lib, but I just want to make it accessible to Particle users.

Ping @rickkas7 @ScruffR

It someone else has uploaded a library with the same name (even only private) you cannot upload a library with that same name.
You either need to rename your library or file a PR on the original contributors repository and hope it’ll be merged and updated by him.

@Postler, if you can provide the exact library name (stated in @rickkas7 may be able to look up who has already claimed that name.

1 Like

Content of

sentence=Library to use the Pixy v2 camera with Particle-Devices

Pixycam5 for Pixy v1 is available in the Libs.

I can provide you with my prepared file structure if this helps.

Ingo, I do remember helping @hasanals with the Pixy2 library a while back. Maybe he has claimed the library name but didn’t get round to publishing the lib.

But I can’t be sure as I have no access to the private libraries list.

I can’t seem to find an existing library named Pixy2, but since it’s not letting you create it, I’d just switch to a different name.

I get the same error from CLI as before:

You are not the owner of this library

after I tested with another library name “Pixy2 CMUcam” and changed the E-Mail to mine.
In both cases I got the same message, after upload.

No blanks in the library name! That’s the reason why you see so many libraries with _ where you’d normally use a blank. After all, the library name is also the name of the main .h and .cpp files and as such they mustnot contain blanks.

Since a blank breaks the library name, your “new” name is still Pixy2.

Does not work yet. Have tried the following changes in

  • name = Pixy2 (I started with that name)
  • name = Pixy2_CMUcam (with underscore)
  • name = Pixy2_CMUcam + renamed src/Pixy2.h > src/Pixy2_CMUcam.h

How does the importer know that I am not the owner of the Lib?

Being the owner of the lib only depends on who - or rather which account - has uploaded a lib with that very name. There is no connection between the URL, Repository or Author field of

I guess the error messages for your three tries did slightly vary, so it would have been good to state each of the individual responses too.

I got no individual errors: always the same how above, ScruffR

You are not the owner of this library

Try some other name again, but now right from the start with the name consistently set in, header .h and .cpp file. Maybe you were just “lucky” to again pick a name that was already taken.

Otherwise you can send me a zip file of your library and I’ll try to upload it.

After receiving @Postler’s zip file the reason for the issue became clear quite quickly. The file was invalid but the error message given by CLI was rather misleading.
After correcting the format of the file I was able to upload the library as Pixy2.
Currently the library hasn’t been made public.

At the moment I prepared the file-structure on a Windows-PC with renewing the lib.prop-file.
I wanted to upload, but I cant authenticate my login with a token.

On MacOS I get the question with e-mail, password AND Token (Pls enter a login code).
This is on Windows missing - using CLI v1.23.0.

Your CLI is rather old which most likely doesn’t support multifactor authentication.
Currently we are at 1.35.2
Try updating via particle update-cli and then try again.

I cant, ScruffR.

There are 3 tools (boom, cryptiles, hoek) out of maintanance. Could be the problem?

Update: I´m deleting CLI (npm uninstall -g particle-cli) and install the Windows-CLI by following this guide. Now v1.35.2 is available and login with token works.

Until one error I cleaned up the code:
Error: Pixy2.h:31:77: ‘SPISettings’ was not declared in this scope
Here the prepared example with manual included files for review:

You need to add #include "Arduino.h" in order to get SPISettings - don’t ask, I’ve had discussions about that to no avail :see_no_evil:

1 Like


Edited and successful uploaded as private library!

So where exactly do I find the private library to test before I share?
The documentation says that I could also access via WebIDE.
I can not find them now - too late for the eyes?

Update: After a while the entry appears: