Integration POST Request returning 302 Error

Hello All,

I'm experiencing a strange error with an API object when making a POST request. This is the request body: 

{
"project_id": 4,
"participant_id": 1,
"strata1": "New York",
"strata2": "9"
}

I'm receiving a 302 error with the following error message:

Error processing integration response

error-result-guidance

The response body could not be converted to an Appian value The jsonText parameter was not valid JSON. Received: <....

I have verified that the API key and endpoint are correct. I am able to get a 400 error using PostMan. Has anyone encountered anything like this before?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer
    as not valid JSON.

    It's an error from the provider, Output is not coming in proper JSON , So contact the service provider.

  • 0
    Certified Lead Developer
    in reply to venkat Avuluri

    The first part of the message "The response body could not be converted to an Appian value" indicates that you are trying to convert the JSON to an Appian value. Can you try setting it to "Return raw response body"?

  • Hi  ,

    Thanks for your response. I set it to "Return raw response body" and I get this raw response: 

    HttpResponse statusLine: "HTTP/1.1 302 Found" statusCode: 302 headers: Dictionary Date: "Fri, 16 Feb 2024 16:43:45 GMT" Content-Type: "text/html; charset=UTF-8" Transfer-Encoding: "chunked" Connection: "keep-alive" Server: "Apache" Cache-Control: "max-age=0, private, no-store, no-cache, must-revalidate" Access-Control-Allow-Origin: "*" Strict-Transport-Security: "max-age=31536000; includeSubdomains; preload" X-Frame-Options: "DENY" X-Content-Type-Options: "nosniff" Vary: "Authorization" Upgrade: "h2,h2c" Location: "">random-dev.abtsites.com/login" X-XSS-Protection: "1; mode=block" Content-Security-Policy: "default-src 'self'; style-src 'self' cdn.jsdelivr.net fonts.googleapis.com parsleyjs.org cdn.datatables.net 'unsafe-inline'; font-src 'self' fonts.googleapis.com fonts.gstatic.com; frame-ancestors 'none'; frame-src 'none'; script-src 'self' cdn.jsdelivr.net cdn.datatables.net cdnjs.cloudflare.com code.jquery.com 'unsafe-inline'; connect-src 'self'; img-src 'self'; object-src 'none'" Set-Cookie: "AWSALBAPP-3=_remove_; Expires=Fri, 23 Feb 2024 16:43:45 GMT; Path=/" contentType: "text/html; charset=UTF-8" body: "<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <meta http-equiv="refresh" content="0;url='">random-dev.abtsites.com/login'" /> <title>Redirecting to random-dev.abtsites.com/.../title> </head> <body> Redirecting to <a href="">random-dev.abtsites.com/.../a>. </body> </html>"

    A 302 redirect to the login page. However, when I test this same reequest from POSTMAN I get a 400 using the same endpoint and credentials. Could this have something to do with whitelsiting on the service provider side?

Reply
  • Hi  ,

    Thanks for your response. I set it to "Return raw response body" and I get this raw response: 

    HttpResponse statusLine: "HTTP/1.1 302 Found" statusCode: 302 headers: Dictionary Date: "Fri, 16 Feb 2024 16:43:45 GMT" Content-Type: "text/html; charset=UTF-8" Transfer-Encoding: "chunked" Connection: "keep-alive" Server: "Apache" Cache-Control: "max-age=0, private, no-store, no-cache, must-revalidate" Access-Control-Allow-Origin: "*" Strict-Transport-Security: "max-age=31536000; includeSubdomains; preload" X-Frame-Options: "DENY" X-Content-Type-Options: "nosniff" Vary: "Authorization" Upgrade: "h2,h2c" Location: "">random-dev.abtsites.com/login" X-XSS-Protection: "1; mode=block" Content-Security-Policy: "default-src 'self'; style-src 'self' cdn.jsdelivr.net fonts.googleapis.com parsleyjs.org cdn.datatables.net 'unsafe-inline'; font-src 'self' fonts.googleapis.com fonts.gstatic.com; frame-ancestors 'none'; frame-src 'none'; script-src 'self' cdn.jsdelivr.net cdn.datatables.net cdnjs.cloudflare.com code.jquery.com 'unsafe-inline'; connect-src 'self'; img-src 'self'; object-src 'none'" Set-Cookie: "AWSALBAPP-3=_remove_; Expires=Fri, 23 Feb 2024 16:43:45 GMT; Path=/" contentType: "text/html; charset=UTF-8" body: "<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <meta http-equiv="refresh" content="0;url='">random-dev.abtsites.com/login'" /> <title>Redirecting to random-dev.abtsites.com/.../title> </head> <body> Redirecting to <a href="">random-dev.abtsites.com/.../a>. </body> </html>"

    A 302 redirect to the login page. However, when I test this same reequest from POSTMAN I get a 400 using the same endpoint and credentials. Could this have something to do with whitelsiting on the service provider side?

Children