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 Reply Children
  • 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?

  • 0
    Certified Senior Developer
    in reply to shanellen5370

    Just checked it in google 302 comes when the location of the resource changed and search engines are not updated to the resource.

  • 0
    Certified Lead Developer
    in reply to shanellen5370

    It could be that Postman is following the 302 and then tries to repeat the call at the new resource.

    Or other things. I suggest to get in contact with the DEVs of that API and discuss that.

  • I was able to find the solution. It was Bearer authentication, so I had to send it as Bearer <token>.  Thanks for the replies.