I've just configured this with a brand new bearer key and token, but am receiving the following error:
ERROR: NetBox returned: Forbidden: Invalid authorization header: Must be in the form "Bearer <key>.<token>" or "Token <token>"
I've recreated the key multiple times with the proper rights, but no luck.
; Requires an NetBox API token with full permissions on all objects except 'auth',
; 'secrets' and 'users'
api_token = Bearer nbt_LONGSTRING.LONGERSTRING
; Requires a hostname or IP which points to your NetBox instance
host_fqdn = umnetbox
FYI curl with the same code works:
curl -X GET -H "Authorization: Bearer nbt_LONGSTRING.LONGERSTRING" -H "Content-Type:
application/json" -H "Accept: application/json; indent=4" http://umnetbox/api/status/
{
"django-version": "6.0.6",
"hostname": "227d5d53f045",
"installed_apps": {
"django_filters": "25.2",
"django_prometheus": "2.4.0",
"django_rq": "4.1.0",
"django_tables2": "2.8.0",
"drf_spectacular": "0.29.0",
"drf_spectacular_sidecar": "2026.6.1",
"mptt": "0.18.0",
"rest_framework": "3.17.1",
"social_django": "5.9.0",
"taggit": "6.1.0",
"timezone_field": "7.2.2"
},
"netbox-version": "4.6.4",
"netbox-full-version": "4.6.4-Docker-5.0.1",
"plugins": {},
"python-version": "3.14.4",
"rq-workers-running": 1
}
NetBox Community v4.6.4-Docker-5.0.1
I've just configured this with a brand new bearer key and token, but am receiving the following error:
ERROR: NetBox returned: Forbidden: Invalid authorization header: Must be in the form "Bearer <key>.<token>" or "Token <token>"I've recreated the key multiple times with the proper rights, but no luck.
FYI curl with the same code works:
NetBox Community v4.6.4-Docker-5.0.1