QRCode for API Tokens #4346

Closed
opened 2025-12-29 18:35:01 +01:00 by adam · 7 comments
Owner

Originally created by @khrys63 on GitHub (Dec 11, 2020).

Environment

* Python version: 3.6.9
* NetBox version: 2.9.10

Proposed Functionality

Adding a QRCode on API Tokens screen /user/api-tokens/ for each token with : APItoken value and server name url

Use Case

We can scan those informations on mobile device for a simple app's configuration

Database Changes

none

External Dependencies

none

Originally created by @khrys63 on GitHub (Dec 11, 2020). ### Environment * Python version: 3.6.9 * NetBox version: 2.9.10 ### Proposed Functionality Adding a QRCode on API Tokens screen /user/api-tokens/ for each token with : APItoken value and server name url ### Use Case We can scan those informations on mobile device for a simple app's configuration ### Database Changes none ### External Dependencies none
adam closed this issue 2025-12-29 18:35:01 +01:00
Author
Owner

@khrys63 commented on GitHub (Dec 14, 2020):

screen for example :
netbox-apitoken-screen
for example

@khrys63 commented on GitHub (Dec 14, 2020): screen for example : ![netbox-apitoken-screen](https://user-images.githubusercontent.com/21293925/102068443-b6a12880-3dfc-11eb-8922-19ee695474dc.png) for example
Author
Owner

@DanSheps commented on GitHub (Dec 14, 2020):

I think it might make more sense for us to instead expand plugins to interact with the api token page. This seems to be a corner case that not everyone could benefit from and the heavy lifting for things like barcodes should not be in the netbox core.

Whereas the plugin could easily be allowed to interact with this in some form or another.

@DanSheps commented on GitHub (Dec 14, 2020): I think it might make more sense for us to instead expand plugins to interact with the api token page. This seems to be a corner case that not everyone could benefit from and the heavy lifting for things like barcodes should not be in the netbox core. Whereas the plugin could easily be allowed to interact with this in some form or another.
Author
Owner

@khrys63 commented on GitHub (Dec 14, 2020):

I can reduce it and put it on the right under the three butons.
It's just the API token under a QRCode view.

5 code lines on the core netbox code vs a repo and lot of stuff

with a good UI it can be integrated on the core?

In some day I will present DAMNED : Datacenter Asset Management for Netbox External Device.
This application aimed to allow Asset Management inside the datacenter with a disconnected handheld device. It is synchronized with to Netbox DCIM.
This apps need the APIToken on QRCode to a fast configuration :)

@khrys63 commented on GitHub (Dec 14, 2020): I can reduce it and put it on the right under the three butons. It's just the API token under a QRCode view. 5 code lines on the core netbox code vs a repo and lot of stuff with a good UI it can be integrated on the core? In some day I will present DAMNED : Datacenter Asset Management for Netbox External Device. This application aimed to allow Asset Management inside the datacenter with a disconnected handheld device. It is synchronized with to Netbox DCIM. This apps need the APIToken on QRCode to a fast configuration :)
Author
Owner

@DanSheps commented on GitHub (Dec 14, 2020):

Yes, I understand it is 5 lines, but those 5 lines the core maintainers are then responsible for maintaining.

Additionally, a plugin only costs us 1 line. Further, this won't be desirable by most and could also result in security breaches (what if someone is looking over your shoulder while you are working in tokens and scans a privileged token?).

Plugins would offer the most customizability. Not everyone is going to want this functionality and if we keep adding Niche features like this without using the plugin framework our views are going to end up looking cluttered.

Either way, as this is a feature request it isn't going to get actioned right away.

@DanSheps commented on GitHub (Dec 14, 2020): Yes, I understand it is 5 lines, but those 5 lines the core maintainers are then responsible for maintaining. Additionally, a plugin only costs us 1 line. Further, this won't be desirable by most and could also result in security breaches (what if someone is looking over your shoulder while you are working in tokens and scans a privileged token?). Plugins would offer the most customizability. Not everyone is going to want this functionality and if we keep adding Niche features like this without using the plugin framework our views are going to end up looking cluttered. Either way, as this is a feature request it isn't going to get actioned right away.
Author
Owner

@jeremystretch commented on GitHub (Dec 14, 2020):

Yes, I understand it is 5 lines

Five lines plus a new Javascript dependency that needs to be reviewed and kept up to date. The proposed functionality doesn't justify the introduction of a new dependency IMO, but it might for a plugin.

@jeremystretch commented on GitHub (Dec 14, 2020): > Yes, I understand it is 5 lines Five lines _plus_ a new Javascript dependency that needs to be reviewed and kept up to date. The proposed functionality doesn't justify the introduction of a new dependency IMO, but it might for a plugin.
Author
Owner

@khrys63 commented on GitHub (Dec 14, 2020):

I work on the plugin :)

@khrys63 commented on GitHub (Dec 14, 2020): I work on the plugin :)
Author
Owner

@jeremystretch commented on GitHub (Dec 15, 2020):

I'm going to close this out in favor a plugin approach. Please note that you'll likely need to open a separate FR to enable plugins to embed content on the API tokens page, which may require further discussion.

@jeremystretch commented on GitHub (Dec 15, 2020): I'm going to close this out in favor a plugin approach. Please note that you'll likely need to open a separate FR to enable plugins to embed content on the API tokens page, which may require further discussion.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4346