Hi All, I created one restlet. The endpoint is wor...
# integrations
v
Hi All, I created one restlet. The endpoint is working correctly when I'm making request from the postman but then the same endpoint is not working when the request is coming from the thirdparty. Below is the error showing in the third party console.
Status: Error
• HttpStatusCode: 403 • Message: ◦ ForbiddenNewtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: e. Path '', line 0, position 0. ◦
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
at ProviderOpenProxy.Common.StreamExtensions.ReadAndDeserializeFromJson[T](Stream stream) in D:\Agents\2\inContact\BF22.2.0.x-VC\src\Code\C#\Services\VCSvc\Providers\ProviderOpenProxy\Common\StreamExtensions.cs:line 35
at ProviderOpenProxy.Clients.HttpResponseToOpenProxyResponse.From(HttpResponseMessage response, String verb) in D:\Agents\2\inContact\BF22.2.0.x-VC\src\Code\C#\Services\VCSvc\Providers\ProviderOpenProxy\Clients\HttpResponseToOpenProxyResponse.cs:line 72
e
set Content-Type to application/json
c
Same thread is in #C29HQS63G He said they are setting to application/json. I said to set a debug point as whatever is coming in must be malformed them. I've seen that exact JS error when its not set to application/json though.
v
Thanks @creece. Where did you test It by removing the application/json? I tried it in postman. It's throwing different error.
c
It would be in the headers in postman
This is easily debuggable w/ a breakpoint on the service thats calling your integration if they can.