# Api Authorization

**URL:** <https://forum.youcanbook.me/t/api-authorization/2233>\
**Category:** API\
**Created:** [May 1, 2023, 1:54pm UTC](https://forum.youcanbook.me/t/api-authorization/2233 "2023-05-01T13:54:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![webivan](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@webivan](https://forum.youcanbook.me/u/webivan)\
**Post date:** [May 1, 2023, 1:54pm UTC](https://forum.youcanbook.me/t/api-authorization/2233/1 "2023-05-01T13:54:44Z")

</div>

Hello.  
I’m trying to get understanding of API but getting Authorization error:

```auto
{
	"type": "CaligraphException",
	"code": "caligraph_not_using_basic_authentication",
	"message": "Please use Basic authentication.",
	"status": "UNAUTHORIZED",
	"errors": [
	],
	"httpStatusCode": 401
}

```

I’m requesting [https://api.youcanbook.me/v1/{ProfileId}/bookings](https://api.youcanbook.me/v1/%7BProfileId%7D/bookings), where {ProfileId} is replaced with my profileID

I’ve tried using Basic auth with `Authorization: Basic base64-of-login:pass`, I’ve also tried token auth with `Authorization: token-from-dashboard` and `Authorization: Bearer token-from-dashboard`

All requests returns same 401 error.  
Can you please point me to what am I making wrong when trying to fetch bookings list

UPD. I also get same error for any `GET` url in the API, like `https://api.youcanbook.me/v1/profiles` and `https://api.youcanbook.me/v1/profiles/{profileId}`

---

<div class="post-metadata">

**Author:** ![Ben](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.youcanbook.me/ben/32/772_2.png) [@Ben](https://forum.youcanbook.me/u/Ben)\
**Post date:** [May 3, 2023, 10:00am UTC](https://forum.youcanbook.me/t/api-authorization/2233/2 "2023-05-03T10:00:13Z")

</div>

@webivan I am sorry you are hitting a snag with the API. What system are you using to generate the request?

If you are using your API key and account ID you should be able to GET all of the profiles from your account.

For bookings specifically you can make a request to v1/bookings/?profileIds={ProfileId}
