Getting this error while hitting the local api - Blocked request to unsafe URL

Hello Team,

I am facing this issue while hitting the submit button and tried to submit my form, and hitting the local api from alpha UI, unable to move forward with my POC assignment, PLease respond ASAP

@Sam @NashitaAfrah @_Karthik_Kodeer @Eldho @Tanveer

{
“status”: “error”,
“statusCode”: 500,
“error”: {
“code”: “INTERNAL_SERVER_ERROR”,
“message”: “Blocked request to unsafe URL”,
“details”: null
}
}

{
“url”: {
“type”: “string”,
“value”: “http://localhost:8081/api/loan”
},
“path”: “”,
“method”: “POST”,
“headers”: {
“Content-Type”: “application/json”
},
“body”: “{“status”:“SUBMITTED”,“user_id”:1,“applicant_name”:“Himanshu Sahu",“dob”:“1998-08-12”,“gender”:“male”,“mobile”:“9876543210”,“email”:"himanshu.sahu@expleogroup.com”,“address”:“HSR Layout”,“employment_type”:“Salaried”,“employer_name”:“Expleo”,“monthly_income”:120000,“loan_type”:“Home Loan”,“loan_amount”:2500000,“loan_tenure”:120,“credit_score”:780,“purpose_of_loan”:“Home Purchase”}”,
“queryParams”: {
“branch”: “main”
},
“apiAuth”: null,
“parseResponseBody”: true
}

In API Trigger, it is not possible to make an API request that is not added in the Request Service, as it acts like an API Gateway.

As an alternative, you can use Global Custom Code and use fetch to make the API call directly.

Okay,

On my side, I don’t see the Global Custom Code. where can i see it

Can you please provide any documentation or workaround?

Global Custom Code
please go through this to understand global custom code

@Sam

I have deployed my ssd in trinity, for some cases i need to use API request in page, now when i am using in the page. i am getting 500 error, can you please provide resources for Request Service.

@hsahu
If you have an external API that you want to use, it must first be added to the Request Service. This can only be done by someone who has access to the cluster configuration.

As a workaround, you can use Global Custom Code to invoke the external API directly and process the response as needed.