# Need to create a token to bypass 401 error, but when i try to create one i also get the 401 error

**URL:** <https://community.influxdata.com/t/need-to-create-a-token-to-bypass-401-error-but-when-i-try-to-create-one-i-also-get-the-401-error/26200>\
**Category:** Systems\
**Created:** [August 19, 2022, 1:51pm UTC](https://community.influxdata.com/t/need-to-create-a-token-to-bypass-401-error-but-when-i-try-to-create-one-i-also-get-the-401-error/26200 "2022-08-19T13:51:39Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ugvsffzawv](https://avatars.discourse-cdn.com/v4/letter/u/a9adbd/32.png) [@ugvsffzawv](https://community.influxdata.com/u/ugvsffzawv)\
**Post date:** [August 19, 2022, 1:55pm UTC](https://community.influxdata.com/t/need-to-create-a-token-to-bypass-401-error-but-when-i-try-to-create-one-i-also-get-the-401-error/26200/2 "2022-08-19T13:55:07Z")

</div>

> [@ugvsffzawv](#):
>
> influx auth create

Token needs a bucket, and a bucket needs a token? Sound like a circular dependency…

Create user → needs bucket, organisation  
Create bucket-\> needs tocken  
Create organisation → needs token  
Create Token → needs bucket, needs orgnisation

> [@401 Unauthorized access with influxdb\_v2 and telegraf](https://community.influxdata.com/t/401-unauthorized-access-with-influxdb-v2-and-telegraf/24977):
>
> Hi, I’m facing an issue. I’ve created a token for an user inside the admin org. The token have r/w access on a single bucket. I’ve correctly set up the token by using this command : influx auth create --read-bucket id\_bucket --write-bucket id\_bucket -u username --host https://my\_host:8086 -o primary\_org With the token generated I can r/w data with influx cli, I can also read data from grafana with the influxdb datasource. My problem is that I have a 401 Unauthorized access when telegraf wri…

Seems 100% unsolveable i.m.o…?

---

_[View the full topic](https://community.influxdata.com/t/need-to-create-a-token-to-bypass-401-error-but-when-i-try-to-create-one-i-also-get-the-401-error/26200)._
