Closed Trev-W closed 3 years ago
Have you given this token write rights in Netbox?
Sorry Nico, is that the REMOTE_AUTH_ENABLED setting?
On Sun, 8 Nov. 2020, 5:45 pm Nico Domino, notifications@github.com wrote:
Have you given this token write rights in Netbox?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/minitriga/Netbox-Device-Type-Library-Import/issues/6#issuecomment-723553177, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK3O4H4BXQWZ2ZHYWSS5KWLSOZSCLANCNFSM4TOEHVKA .
Sorry what do you mean you copied the token from the configuration.py
file?
You have to generate an API token in the user settings, like so:
Then select "Add a token" at the bottom of the page
And make sure "Write Enabled" is checked.
The generated token is what you have to use with this script.
Running the script results in the above error - it reads the vendor and device and then spits this out, even though the NETBOX_TOKEN was copied from opt/netbox/netbox/netbox/configuration.py
`python3 nb-dt-import.py --vendor HPE Pulled Repo Package devicetype-library is already installed, updating Vendor Specified, Gathering All Matching Device-Types 1 Vendors Found 3 Device-Types Found {"detail":"Invalid token"} {"detail":"Invalid token"} {"detail":"Invalid token"} {"detail":"Invalid token"}
0 devices created 0 interfaces/ports updated 0 manufacturers created`