# The remote server returned an error: (403) Forbidden

**URL:** <https://developer.community.nhs.uk/t/the-remote-server-returned-an-error-403-forbidden/1669>\
**Category:** e-Referral Service (e-RS)\
**Tags:** testing, onboarding, fhir\
**Created:** [14 August 2024 13:39 UTC](https://developer.community.nhs.uk/t/the-remote-server-returned-an-error-403-forbidden/1669 "2024-08-14T13:39:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhishek.ranjan](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@abhishek.ranjan](https://developer.community.nhs.uk/u/abhishek.ranjan)\
**Post date:** [14 August 2024 13:39 UTC](https://developer.community.nhs.uk/t/the-remote-server-returned-an-error-403-forbidden/1669/1 "2024-08-14T13:39:53Z")

</div>

Hello Team,  
We are currently testing eRS integration with our RAS system. As part of this effort, we are trying to generate test referrals in INT and sync them in RAS system. Unfortunately, we have run into (403) Forbidden error.

I am posting the correlation IDs from our testing today as advised by NHS Partners team (we have an ongoing email chain with them).

Some relevant information for reference:

API we are trying to call – A005

The response being received - _‘Forbidden. Check Endpoint configuration or role selected_

_The remote server returned an error: (403) Forbidden.’_

Your request header- This is the full URL + resource we were trying to pull [https://int.api.service.nhs.uk/referrals/FHIR/STU3/ReferralRequest/000049786068](https://url.uk.m.mimecastprotect.com/s/xoLGC2WzZt0R4oJiBipuMXwST?domain=urldefense.com)

ASID- 200000002246

![image](https://europe1.discourse-cdn.com/nhsdigitaldeveloper/original/1X/3a97b0bd28457853189b1fddca58b3f0b8f453c7.png)

Hoping you can help.

---

<div class="post-metadata">

**Author:** ![adam.oldfield](https://dub1.discourse-cdn.com/nhsdigitaldeveloper/user_avatar/developer.community.nhs.uk/adam.oldfield/32/327_2.png) [@adam.oldfield](https://developer.community.nhs.uk/u/adam.oldfield)\
**Post date:** [15 August 2024 07:46 UTC](https://developer.community.nhs.uk/t/the-remote-server-returned-an-error-403-forbidden/1669/2 "2024-08-15T07:46:42Z")

</div>

Hi @abhishek.ranjan,

I don’t seem to be able to find your request from the Correlation/Request-IDs provided.

However, I do see a request for the quoted UBRN at 12:07 with Request Id d0b3f66b-345e-4a83-9e3e-350979502f8e-1.

This response returned HTTP 422 with error code `NO_RELATIONSHIP`.

This indicates that the Organisation configured (O0H1S) for application-restricted access does not have a legitimate relationship with the referral.

The LR rules can be complex, but in its simplest form for a providing organisation to have access to a referral it needs to be booked or deferred to a service at the Organisation.

What is the state of the referral you are trying to access?

Regards,

Adam.

---

<div class="post-metadata">

**Author:** ![abhishek.ranjan](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@abhishek.ranjan](https://developer.community.nhs.uk/u/abhishek.ranjan)\
**Post date:** [19 August 2024 15:34 UTC](https://developer.community.nhs.uk/t/the-remote-server-returned-an-error-403-forbidden/1669/3 "2024-08-19T15:34:10Z")

</div>

Hello Adam,  
That is pretty much in line with what we also noticed from the email chain with NHS Partners.

Looks like the ‘app-restricted-ods-code’ on the **GOSH Cadence App Restricted** app is set to ‘QWO’. However, the GOSH ODS code we are testing with is RP4. Could this be updated?

Screen shot for reference:

 ![GOSH_App_Restricted](https://europe1.discourse-cdn.com/nhsdigitaldeveloper/original/1X/2f88a414a29f55e8aca099bd8a00f135b4fe7da8.png)

To answer your question, the test referral has been sent to a test RP4 service. My guess is - The referral status at this point could be ‘AWAITING\_TRIAGE’. I cannot confirm this for sure until I am on-site since I am unable to connect with eRS ‘INT’ remotely.

---

<div class="post-metadata">

**Author:** ![tony.marsh1](https://dub1.discourse-cdn.com/nhsdigitaldeveloper/user_avatar/developer.community.nhs.uk/tony.marsh1/32/855_2.png) [@tony.marsh1](https://developer.community.nhs.uk/u/tony.marsh1)\
**Post date:** [19 August 2024 16:16 UTC](https://developer.community.nhs.uk/t/the-remote-server-returned-an-error-403-forbidden/1669/4 "2024-08-19T16:16:08Z")

</div>

> [@abhishek.ranjan](#):
>
> app-restricted-ods-code

Hi Abishek, I’ve put the request in to amend app-restricted-ods-code to RP4 - I’ll confirm on here when its complete and ready to re-test.

---

<div class="post-metadata">

**Author:** ![abhishek.ranjan](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@abhishek.ranjan](https://developer.community.nhs.uk/u/abhishek.ranjan)\
**Post date:** [20 August 2024 08:41 UTC](https://developer.community.nhs.uk/t/the-remote-server-returned-an-error-403-forbidden/1669/5 "2024-08-20T08:41:46Z")

</div>

Thanks Tony, much appreciated!

---

<div class="post-metadata">

**Author:** ![tony.marsh1](https://dub1.discourse-cdn.com/nhsdigitaldeveloper/user_avatar/developer.community.nhs.uk/tony.marsh1/32/855_2.png) [@tony.marsh1](https://developer.community.nhs.uk/u/tony.marsh1)\
**Post date:** [20 August 2024 10:57 UTC](https://developer.community.nhs.uk/t/the-remote-server-returned-an-error-403-forbidden/1669/6 "2024-08-20T10:57:25Z")

</div>

Hi Abishek, Think we were a bit out of synch on here, I’d completed the request on Friday - so this is ready to test now 🙂

---

<div class="post-metadata">

**Author:** ![abhishek.ranjan](https://avatars.discourse-cdn.com/v4/letter/a/a6a055/32.png) [@abhishek.ranjan](https://developer.community.nhs.uk/u/abhishek.ranjan)\
**Post date:** [27 August 2024 09:44 UTC](https://developer.community.nhs.uk/t/the-remote-server-returned-an-error-403-forbidden/1669/7 "2024-08-27T09:44:45Z")

</div>

Hey Tony, thought I had replied to this. My bad! We did test this last week, and this seems to have fixed the problem. Thanks for your support with this. 🙂

---

<div class="post-metadata">

**Author:** ![tony.marsh1](https://dub1.discourse-cdn.com/nhsdigitaldeveloper/user_avatar/developer.community.nhs.uk/tony.marsh1/32/855_2.png) [@tony.marsh1](https://developer.community.nhs.uk/u/tony.marsh1)\
**Post date:** [27 August 2024 11:14 UTC](https://developer.community.nhs.uk/t/the-remote-server-returned-an-error-403-forbidden/1669/8 "2024-08-27T11:14:33Z")

</div>

Excellent news 🙂 good luck with testing.
