Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

Request forbidden from OI

I'm testing with some third party API's but any request I send from OI using httpClient_services is returning a 403 forbidden response. The same request sent using Postman returns the expected results.
I was testing with requests that require an Authorization header but I experience the same trouble with their simplest request that requires no headers whatsover.

Any thoughts of anything obvious I may be overlooking?
Or even something not so obvious that may be tricking me up.

Working with wooCommerce REST API's so they should be reliable.
I'd go to them for support but I don't think "works from Postman but not from OI" is going to get me very far.

Comments

  • Should've checked this one before posting.
    Setting UseClientXMLHTTP to true$ got me past the 403.
    I now get the expected result when no authorisation is required.
    I get a 401 for the authorisation required requests. So that's probably me getting the header wrong.
  • Does this mean you do not need any help at this point?
  • It did but now it doesn't. :)

    Can another pair of eyes tell me the difference between these two headers?

    One was created using a variable
    HeaderList = "Authorization":vm$:"Basic ":encodedCredentialsThe other was a hardcoded string.
    The hardcoded string returns the expected result, the other returns a 401 Unauthorized.
  • Thank you. no assistance required.
    The encodedCredentials verson has a carriage return linefeed on the end that I couldn't see.
  • So again...

Sign In or Register to comment.