# Use Basic Auth for an applcation

**URL:** <https://www.thethingsnetwork.org/forum/t/use-basic-auth-for-an-applcation/52283>\
**Category:** Migrating Applications to V3\
**Created:** [October 11, 2021, 1:55pm UTC](https://www.thethingsnetwork.org/forum/t/use-basic-auth-for-an-applcation/52283 "2021-10-11T13:55:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomasw](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/thomasw/32/35697_2.png) [@Thomasw](https://www.thethingsnetwork.org/forum/u/Thomasw)\
**Post date:** [October 11, 2021, 1:55pm UTC](https://www.thethingsnetwork.org/forum/t/use-basic-auth-for-an-applcation/52283/1 "2021-10-11T13:55:57Z")

</div>

Hello  
I want to migrate my application from version 2 to version 3, I use http post with a basic auth to a specific url, In the new version I see many possibilities for Integration. I guess the correct one for me is webhooks but I’m not sure and I don’t know how to implement the authorization in the new version. Is there anyone to help?  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![htdvisser](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/htdvisser/32/45312_2.png) [@htdvisser](https://www.thethingsnetwork.org/forum/u/htdvisser)\
**Post date:** [October 11, 2021, 2:09pm UTC](https://www.thethingsnetwork.org/forum/t/use-basic-auth-for-an-applcation/52283/2 "2021-10-11T14:09:44Z")

</div>

The HTTP Basic Auth header can be constructed as:

```auto
"Authorization: Basic " + base64_encode(username + ":" + password)

```

I’m sure there are some online/offline tools that let you do this.

In the future, we could perhaps make it easier to do this directly in the Console (cc: @kschiffer)

---

<div class="post-metadata">

**Author:** ![htdvisser](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/htdvisser/32/45312_2.png) [@htdvisser](https://www.thethingsnetwork.org/forum/u/htdvisser)\
**Post date:** [October 11, 2021, 3:26pm UTC](https://www.thethingsnetwork.org/forum/t/use-basic-auth-for-an-applcation/52283/4 "2021-10-11T15:26:55Z")

</div>

It would look more like this:

![Screen Shot 2021-10-11 at 17.23.16](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/f/4/f423d7aad07161148b53fedea25cad815b5e371d.png)

The name of the header is “Authorization” and the value of the header is “Basic” followed by a space and then the base64-encoded username and password.

This base64 string can be constructed as follows:

```auto
% echo -n "username:password" | base64
dXNlcm5hbWU6cGFzc3dvcmQ=

```

Or if you’re comfortable with an online tool, there are several online base64 encoders, you can even [ask your search engine](https://duckduckgo.com/?q=base64+username%3Apassword&ia=answer) to encode base64.

---

<div class="post-metadata">

**Author:** ![Thomasw](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/thomasw/32/35697_2.png) [@Thomasw](https://www.thethingsnetwork.org/forum/u/Thomasw)\
**Post date:** [October 12, 2021, 8:27am UTC](https://www.thethingsnetwork.org/forum/t/use-basic-auth-for-an-applcation/52283/5 "2021-10-12T08:27:55Z")

</div>

Many thanks for your answer.  
Everything’s working correctly.

---

<div class="post-metadata">

**Author:** ![system](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/6/2/6250ea44fd2b0d6259489e1a92748df681e1f970.png) [@system](https://www.thethingsnetwork.org/forum/u/system)\
**Post date:** [October 13, 2021, 8:28am UTC](https://www.thethingsnetwork.org/forum/t/use-basic-auth-for-an-applcation/52283/6 "2021-10-13T08:28:09Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
