# Getting "Please Login" message when trying to use API Token

**URL:** <https://forum.kintone.dev/t/getting-please-login-message-when-trying-to-use-api-token/153>\
**Category:** General\
**Tags:** api-token\
**Created:** [June 28, 2018, 2:37pm UTC](https://forum.kintone.dev/t/getting-please-login-message-when-trying-to-use-api-token/153 "2018-06-28T14:37:55Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [June 28, 2018, 2:37pm UTC](https://forum.kintone.dev/t/getting-please-login-message-when-trying-to-use-api-token/153/1 "2018-06-28T14:37:55Z")

</div>

I’m trying to test in Postman using the API token from one of my Kintone apps.

I’ve tried to follow the docs as closely as possible, but I am unsure what I’m missing. I want to pull the records from the App to view.

URL: `https://INSERT_SUBDOMAIN.kintone.com/k/v1/record.json?app=INSERT_APPID`

And then I have:  
`X-Cybozu-API-Token:INSERT_API_TOKEN`

Type Basic Auth

```json
{  
 "code": "CB\_AU01",  
 "id": "5lWI0Q80ERRxOsenuzVk",  
 "message": "Please login."  
}

```

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [June 29, 2018, 7:29pm UTC](https://forum.kintone.dev/t/getting-please-login-message-when-trying-to-use-api-token/153/2 "2018-06-29T19:29:21Z")

</div>

Hi Heather,

When using Postman, I did not see the message "Please login."

I believe the error may have occurred due to the following reasons:

1. **Incorrect Parameter** : Please double-check the URL.

2. **API Token Not Updated** : Ensure you click "Update App" after the API token is generated and saved in the Settings.

Here's how I configured it in the Postman settings:

- Add key `X-Cybozu-API-token` and the value of the generated API token under the "Header" tab.

To retrieve all the records, you will need to add an "s" after "record" in the URL as shown below:

_Get All Records_  
`https://SUBDOMAIN.kintone.com/k/v1/records.json?app=210`

To retrieve a single record, ensure the record exists in the app. Here is the URL:

_Get One Record_  
`https://SUBDOMAIN.kintone.com/k/v1/record.json?app=210&id=1`

Thanks,

Junko

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [July 12, 2018, 1:20pm UTC](https://forum.kintone.dev/t/getting-please-login-message-when-trying-to-use-api-token/153/3 "2018-07-12T13:20:49Z")

</div>

Hello! Thanks Junko! This is great! I got a successful return in Postman - but I’ve also switched to Basic Authentication. This will apply also, I’m assuming?

&nbsp;

Thanks again!

~h

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [July 13, 2018, 12:21am UTC](https://forum.kintone.dev/t/getting-please-login-message-when-trying-to-use-api-token/153/4 "2018-07-13T00:21:08Z")

</div>

Hello Heather,

I am glad you got the problem solved.

Please refer to the following link for User Authentication.  
There is a section explaining Basic Authentication in the link as well.

[Kintone REST API Overview \> Authentication - Kintone Developer Program](https://kintone.dev/en/docs/kintone/rest-api/overview/kintone-rest-api-overview/#authentication)

Thank you,  
Yasu

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [July 25, 2018, 2:35pm UTC](https://forum.kintone.dev/t/getting-please-login-message-when-trying-to-use-api-token/153/5 "2018-07-25T14:35:02Z")

</div>

I’ve still got an issue with this - not sure if you can help me - but I figured I’d at least try.&nbsp;

So I’ve got Basic Authentication set up correctly and have tested in Postman - all works great. I am now trying to do the same exact thing in Power BI. I’ve outlined the issue here:&nbsp;[https://community.powerbi.com/t5/Desktop/Authentication-Required-Remove-this-step/m-p/471628#M219152&nbsp;](https://community.powerbi.com/t5/Desktop/Authentication-Required-Remove-this-step/m-p/471628#M219152%C2%A0)

&nbsp;

would you have ANY idea why it won’t accept the ‘?app=210’ part of the URL? I know this isn’t your area specifically - but I’m kind of desperate to try and get this working. So I’m trying everything.

If you can’t - completely understand. Thanks! 🙂

&nbsp;

![](https://developer.kintone.io/hc/user_images/htvObIFX64cyr78XPZrOJw.png) ![](https://developer.kintone.io/hc/user_images/wWNBe9ixXR3w3bFHsl9seA.png)

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [July 26, 2018, 5:53pm UTC](https://forum.kintone.dev/t/getting-please-login-message-when-trying-to-use-api-token/153/6 "2018-07-26T17:53:38Z")

</div>

Hi Heather,  
I have never used Power IB before, so I installed it and included the following info on the set-up “From Web” screen.

![](https://developer.kintone.io/hc/user_images/2aXaG1TFVOYWBOqd7yiH4w.png)

Somehow, I did not see “Access Web content” screen and was able to get the data below successfully&nbsp; .

![](https://developer.kintone.io/hc/user_images/NSauOFmSP-HXCdT9YGz96Q.png)  
What I realized is that if I input the wrong URL, I was navigated to “Access Web content”. Then as you said, under “Anonymous” tab, the URL does not have the full address as I specified but without “?app=154”(in my case). Therefore, I would suggest you to double check the URL on&nbsp; “From Web”. Hope it helps.

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [July 26, 2018, 7:01pm UTC](https://forum.kintone.dev/t/getting-please-login-message-when-trying-to-use-api-token/153/7 "2018-07-26T19:01:53Z")

</div>

I don’t get it. ☹ My settings are the exact same as yours…&nbsp; I’ve checked the URL - it’s the same exact one you listed in the earlier part of this forum. It works in my Postman (and in your’s). I have no idea…

&nbsp;

Thank you for your help with this. At least I know it IS, indeed, possible. Something is off -&nbsp; I just can’t figure out what

![](https://developer.kintone.io/hc/user_images/waKwwpWqA32Ke6IxjUlMDA.png)

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [July 26, 2018, 8:43pm UTC](https://forum.kintone.dev/t/getting-please-login-message-when-trying-to-use-api-token/153/9 "2018-07-26T20:43:13Z")

</div>

Thank you for your help - so much! :D&nbsp;

~h

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [November 7, 2018, 1:12pm UTC](https://forum.kintone.dev/t/getting-please-login-message-when-trying-to-use-api-token/153/10 "2018-11-07T13:12:24Z")

</div>

Hi Junko,

When you are adding the API token to the header, what it the Authentication method? I can only get this to work in Postman when using Basic Auth with Username: X-Cybozu-API-Token and the password as my API token.

&nbsp;

thanks,

&nbsp;

Nathan
