# Basic Authencation using uri Module (Post)

**URL:** <https://forum.ansible.com/t/basic-authencation-using-uri-module-post/37059>\
**Category:** Ansible Project\
**Created:** [September 1, 2022, 5:45pm UTC](https://forum.ansible.com/t/basic-authencation-using-uri-module-post/37059 "2022-09-01T17:45:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohammed\_Reehan](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Mohammed\_Reehan](https://forum.ansible.com/u/Mohammed_Reehan)\
**Post date:** [September 1, 2022, 5:45pm UTC](https://forum.ansible.com/t/basic-authencation-using-uri-module-post/37059/1 "2022-09-01T17:45:31Z")

</div>

Hello Experts,

Need your kind help, i am running a basic POST call using ansible uri module with Basic Authencation  
below is the programtic code but i am getting 403 error.

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [September 1, 2022, 9:56pm UTC](https://forum.ansible.com/t/basic-authencation-using-uri-module-post/37059/2 "2022-09-01T21:56:22Z")

</div>

> Hello Experts,
> 
> Need your kind help, i am running a basic POST call using ansible uri module with Basic Authencation  
> below is the programtic code but i am getting 403 error.
> 
> * * *
> 
> -name: Request API Token  
> ansible.builtin.uri:  
> url: “https”[//vrlcm.local/lcm/authzn/api/login](https://vrlcm.local/lcm/authzn/api/login)"

For starters the url is incorrect, it’s got a  
Semicolon mixed by a double quote

---

<div class="post-metadata">

**Author:** ![Mohammed\_Reehan](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Mohammed\_Reehan](https://forum.ansible.com/u/Mohammed_Reehan)\
**Post date:** [September 1, 2022, 10:00pm UTC](https://forum.ansible.com/t/basic-authencation-using-uri-module-post/37059/3 "2022-09-01T22:00:54Z")

</div>

Apologize for the error that , it was a typo tbh. Well the issue is still present.

Thanks  
Reehan

---

<div class="post-metadata">

**Author:** ![Mohammed\_Reehan](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Mohammed\_Reehan](https://forum.ansible.com/u/Mohammed_Reehan)\
**Post date:** [September 2, 2022, 5:08pm UTC](https://forum.ansible.com/t/basic-authencation-using-uri-module-post/37059/4 "2022-09-02T17:08:20Z")

</div>

Hello Experts,

Hate to follow up but looking for a help/solution

---

<div class="post-metadata">

**Author:** ![dnmvisser](https://avatars.discourse-cdn.com/v4/letter/d/8e8cbc/32.png) [@dnmvisser](https://forum.ansible.com/u/dnmvisser)\
**Post date:** [September 2, 2022, 6:23pm UTC](https://forum.ansible.com/t/basic-authencation-using-uri-module-post/37059/5 "2022-09-02T18:23:05Z")

</div>

"urlopen error tunnel connection failed: 403 forribidden" indicates an  
issue with a proxy.  
But - there is some sort of typo again there (forribidden).  
No problem with being impatient but please pay more attention to your  
question/copy/pasting, to avoid wasting everyone's time here.

In any case, you've explicitly configured "use\_proxy: no".  
This leads me to suspect that your network might have implemented a  
transparent proxy.  
Can you confirm that the same request, from the same host, but done  
manually with curl, does work?  
Please post the evidence of that, so we can rule out any proxy issues.
