# InfluxDB v2 Cloud API authentification: "bucket not found"

**URL:** <https://community.influxdata.com/t/influxdb-v2-cloud-api-authentification-bucket-not-found/16885>\
**Category:** InfluxDB 2\
**Tags:** influxdb-cloud-2-0\
**Created:** [November 23, 2020, 6:30pm UTC](https://community.influxdata.com/t/influxdb-v2-cloud-api-authentification-bucket-not-found/16885 "2020-11-23T18:30:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prex](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/prex/32/6016_2.png) [@prex](https://community.influxdata.com/u/prex)\
**Post date:** [November 23, 2020, 6:30pm UTC](https://community.influxdata.com/t/influxdb-v2-cloud-api-authentification-bucket-not-found/16885/1 "2020-11-23T18:30:29Z")

</div>

I’m new to using APIs, but I’m already having a hard time to make the most basic example of the InfluxDB v2 Cloud API work. I set up a Cloud account, created a bucket, did some successful testing with the Python client and now wanted to switch over to using the API.

My starting point is the [Authentification example here](https://docs.influxdata.com/influxdb/cloud/reference/api/). I opened my terminal and wrote:

```auto
curl --request POST https://eu-central-1-1.aws.cloud2.influxdata.com/api/v2/write --header "Authorization: Token read_write_token_for_bucket" --data-urlencode "org=me@mail.ch" --data-urlencode "bucket=my_own_Bucket"

```

This gives me:

```auto
{"code":"not found","message":"bucket not found"}

```

I double and triple checked the bucket name and corresponding token.

Then, I switched to Postman and sent the same request. The result was the same 404.

What am I doing wrong here?

---

<div class="post-metadata">

**Author:** ![prex](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/prex/32/6016_2.png) [@prex](https://community.influxdata.com/u/prex)\
**Post date:** [November 24, 2020, 12:20pm UTC](https://community.influxdata.com/t/influxdb-v2-cloud-api-authentification-bucket-not-found/16885/2 "2020-11-24T12:20:21Z")

</div>

It works now. The parameters need to be sent as query params, which does not seem to be the case in the example:

```auto
curl --request POST "https://eu-central-1-1.aws.cloud2.influxdata.com/api/v2/write?bucket=newbucket&org=me@mail.ch" --header "Authorization: Token xxxTOKENxxx" 

```

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [November 24, 2020, 6:42pm UTC](https://community.influxdata.com/t/influxdb-v2-cloud-api-authentification-bucket-not-found/16885/3 "2020-11-24T18:42:26Z")

</div>

Hello,  
Placing this here as reference to anyone who stumbles across this:

> **[InfluxDB v2.0 API documentation](https://docs.influxdata.com/influxdb/v2.0/api/#tag/Write)**
>
> The InfluxDB API provides a programmatic interface for interactions with InfluxDB v2.0.
