org.springframework.web.client.HttpClientErrorException: 403 Forbidden

Hi,

i am trying to implement your api into one of our spring application. When i send the json below i get a 403 error. However when i paste it into your sand box i am getting back expected result

{
    "payload": {
        "Header": {
            "@xmlns": "#",
            "MessageType": "Request",
            "TestMode": true,
            "DeviceID": "PLATFORM",
            "SubmissionNumber": "9a9e25b6-e00e-4ae2-8804-ea05f0ffb060",
            "Authentication": {
                "MD5Value": "######",
                "AccNumber": "#######",
                "ApplicationID": "#######"
            }
        },
        "Body": {
            "ClientDetails": {
                "CompanyName": "My Test Company Limited",
                "AllowAttachPDF": false,
                "AccountReference": "PF00001",
                "AddressLine1": "Office 6",
                "AddressLine2": "222 Kensington High Street",
                "AddressLine3": "Kensington",
                "Town": "London",
                "CountryISO": "GB",
                "Postcode": "W8 7FG",
                "VatNumber": "GB 100 100 100",
                "VatExempt": false,
                "Preferences": {
                    "DefaultSendMethod": "EMAIL",
                    "DefaultCurrency": "GBP",
                    "DefaultTerm": "14"
                }
            },
            "@xmlns": "######",
            "ClientContacts": {
                "DefaultContact": {
                    "Surname": "Smith",
                    "FirstName": "John",
                    "TelephoneNumbers": {
                        "Telephone": [
                            "0207 111 1111",
                            "0207 111 2222"
                        ]
                    },
                    "Email": "###",
                    "Password": "abc123"
                }
            }
        }
    }
}

To send it i have written the below code. I am wondering if there is anything else that i need to do.

String url =END_POINT+"Client/Create";
RestTemplate restTemplate = new RestTemplate();
String result = restTemplate.postForObject(url, param,String.class);

Hello @sampzz

The sandbox and the live API uses the same endpoints.

What is the endpoint you’re sending to in your live version (the full URL)?

hi

i am sending it to “https://api.quickfile.co.uk/1_2/Client/Create”

What is param here? If you’re just trying to pass the JSON as a plain string then you may need to wrap it in an HttpEntity so you can set the Content-Type to application/json rather than text/plain

the param is the json containing the payload and inside the payload i have the header and body. it is the same one as the model i sent initially. For testing purpose i am converting my response to string.

Do i need to put anything i my httpheader?

As far as I can see from what you’ve provided above (the URL and the JSON), it should work fine, although "@xmlns": "######", isn’t a requirement, so it may be worth removing this.

These two values are no longer required, so it may be worth removing these too.

I’m not familiar with the Spring Framework, but I recommend trying the change @ian_roberts also mentioned so the content is specifically defined as JSON.

What I meant is that if param is currently a java.lang.String then I suspect it will get sent by the restTemplate as Content-Type: text/plain, if you wrap it as HttpEntity then you can force it to use application/json:

HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
HttpEntity<String> entity = new HttpEntity<String>(param, headers);
String result = restTemplate.postForObject(url, entity, String.class);

To properly debug this I’d turn on wire logging so you can see in the log file exactly what is being sent and received over the HTTP connection.

thanks.
I am not geting 403 anymore. However i am now getting 400 and my current count is going up on quickfile even though i am getting 400.

At this point I’d definitely be looking at wire logging to get the exact error message associated with the 400 response.

2018-10-16 18:05:19.078 DEBUG 20288 --- [nio-8337-exec-1] o.a.h.client.protocol.RequestAddCookies  : CookieSpec selected: default
2018-10-16 18:05:19.086 DEBUG 20288 --- [nio-8337-exec-1] o.a.h.client.protocol.RequestAuthCache   : Auth cache not set in the context
2018-10-16 18:05:19.086 DEBUG 20288 --- [nio-8337-exec-1] h.i.c.PoolingHttpClientConnectionManager : Connection request: [route: {s}->###][total kept alive: 0; route allocated: 0 of 5; total allocated: 0 of 10]
2018-10-16 18:05:19.095 DEBUG 20288 --- [nio-8337-exec-1] h.i.c.PoolingHttpClientConnectionManager : Connection leased: [id: 8][route: {s}->##:443][total kept alive: 0; route allocated: 1 of 5; total allocated: 1 of 10]
2018-10-16 18:05:19.096 DEBUG 20288 --- [nio-8337-exec-1] o.a.http.impl.execchain.MainClientExec   : Opening connection {s}->######43
2018-10-16 18:05:19.101 DEBUG 20288 --- [nio-8337-exec-1] .i.c.DefaultHttpClientConnectionOperator : Connecting to a#104.16.149.207:443
2018-10-16 18:05:19.102 DEBUG 20288 --- [nio-8337-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   : Connecting socket to a###10# with timeout 0
2018-10-16 18:05:19.113 DEBUG 20288 --- [nio-8337-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   : Enabled protocols: [TLSv1, TLSv1.1, TLSv1.2]
2018-10-16 18:05:19.114 DEBUG 20288 --- [nio-8337-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   : Enabled cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_DSS_WITH_AES_256_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, TLS_RSA_WITH_AES_256_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA, TLS_ECDH_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_RSA_WITH_AES_256_CBC_SHA, TLS_DHE_DSS_WITH_AES_256_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384, TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_DSS_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
2018-10-16 18:05:19.116 DEBUG 20288 --- [nio-8337-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   : Starting handshake
2018-10-16 18:05:19.206 DEBUG 20288 --- [nio-8337-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   : Secure session established
2018-10-16 18:05:19.207 DEBUG 20288 --- [nio-8337-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   :  negotiated protocol: TLSv1.2
2018-10-16 18:05:19.208 DEBUG 20288 --- [nio-8337-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   :  negotiated cipher suite: TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
2018-10-16 18:05:19.209 DEBUG 20288 --- [nio-8337-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   :  peer principal: C####, OU=PositiveSSL Multi-Domain, OU=Domain Control Validated
2018-10-16 18:05:19.209 DEBUG 20288 --- [nio-8337-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   :  peer alternative names: [.ssl462675.cloudflaressl.com, *.quickfile.co.uk, .quickfile.co.uk]
2018-10-16 18:05:19.211 DEBUG 20288 --- [nio-8337-exec-1] o.a.h.c.ssl.SSLConnectionSocketFactory   :  issuer principal: CN=COMODO ECC Domain Validation Secure Server CA 2, O=COMODO CA Limited, L=Salford, ST=Greater Manchester, C=GB
2018-10-16 18:05:19.212 DEBUG 20288 --- [nio-8337-exec-1] .i.c.DefaultHttpClientConnectionOperator : Connection established 192.168.12.31:56292<->104.16.149.207:443
2018-10-16 18:05:19.212 DEBUG 20288 --- [nio-8337-exec-1] o.a.http.impl.execchain.MainClientExec   : Executing request POST /1_2/Client/Create HTTP/1.1
2018-10-16 18:05:19.213 DEBUG 20288 --- [nio-8337-exec-1] o.a.http.impl.execchain.MainClientExec   : Target auth state: UNCHALLENGED
2018-10-16 18:05:19.214 DEBUG 20288 --- [nio-8337-exec-1] o.a.http.impl.execchain.MainClientExec   : Proxy auth state: UNCHALLENGED
2018-10-16 18:05:19.215 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 >> POST /1_2/Client/Create HTTP/1.1
2018-10-16 18:05:19.216 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 >> Accept: text/plain, application/json, application/*+json, */*
2018-10-16 18:05:19.216 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 >> Content-Type: application/json
2018-10-16 18:05:19.217 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 >> Accept-Charset: big5, big5-hkscs, cesu-8, euc-jp, euc-kr, gb18030, gb2312, gbk, ibm-thai, ibm00858, ibm01140, ibm01141, ibm01142, ibm01143, ibm01144, ibm01145, ibm01146, ibm01147, ibm01148, ibm01149, ibm037, ibm1026, ibm1047, ibm273, ibm277, ibm278, ibm280, ibm284, ibm285, ibm290, ibm297, ibm420, ibm424, ibm437, ibm500, ibm775, ibm850, ibm852, ibm855, ibm857, ibm860, ibm861, ibm862, ibm863, ibm864, ibm865, ibm866, ibm868, ibm869, ibm870, ibm871, ibm918, iso-2022-cn, iso-2022-jp, iso-2022-jp-2, iso-2022-kr, iso-8859-1, iso-8859-13, iso-8859-15, iso-8859-2, iso-8859-3, iso-8859-4, iso-8859-5, iso-8859-6, iso-8859-7, iso-8859-8, iso-8859-9, jis_x0201, jis_x0212-1990, koi8-r, koi8-u, shift_jis, tis-620, us-ascii, utf-16, utf-16be, utf-16le, utf-32, utf-32be, utf-32le, utf-8, windows-1250, windows-1251, windows-1252, windows-1253, windows-1254, windows-1255, windows-1256, windows-1257, windows-1258, windows-31j, x-big5-hkscs-2001, x-big5-solaris, x-euc-jp-linux, x-euc-tw, x-eucjp-open, x-ibm1006, x-ibm1025, x-ibm1046, x-ibm1097, x-ibm1098, x-ibm1112, x-ibm1122, x-ibm1123, x-ibm1124, x-ibm1166, x-ibm1364, x-ibm1381, x-ibm1383, x-ibm300, x-ibm33722, x-ibm737, x-ibm833, x-ibm834, x-ibm856, x-ibm874, x-ibm875, x-ibm921, x-ibm922, x-ibm930, x-ibm933, x-ibm935, x-ibm937, x-ibm939, x-ibm942, x-ibm942c, x-ibm943, x-ibm943c, x-ibm948, x-ibm949, x-ibm949c, x-ibm950, x-ibm964, x-ibm970, x-iscii91, x-iso-2022-cn-cns, x-iso-2022-cn-gb, x-iso-8859-11, x-jis0208, x-jisautodetect, x-johab, x-macarabic, x-maccentraleurope, x-maccroatian, x-maccyrillic, x-macdingbat, x-macgreek, x-machebrew, x-maciceland, x-macroman, x-macromania, x-macsymbol, x-macthai, x-macturkish, x-macukraine, x-ms932_0213, x-ms950-hkscs, x-ms950-hkscs-xp, x-mswin-936, x-pck, x-sjis_0213, x-utf-16le-bom, x-utf-32be-bom, x-utf-32le-bom, x-windows-50220, x-windows-50221, x-windows-874, x-windows-949, x-windows-950, x-windows-iso2022jp
2018-10-16 18:05:19.221 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 >> Content-Length: 1362
2018-10-16 18:05:19.222 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 >> Host: api.quickfile.co.uk
2018-10-16 18:05:19.223 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 >> Connection: Keep-Alive
2018-10-16 18:05:19.225 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 >> User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_171)
2018-10-16 18:05:19.227 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 >> Accept-Encoding: gzip,deflate
2018-10-16 18:05:19.229 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "POST /1_2/Client/Create HTTP/1.1[\r][\n]"
2018-10-16 18:05:19.233 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "Accept: text/plain, application/json, application/*+json, */*[\r][\n]"
2018-10-16 18:05:19.233 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "Content-Type: application/json[\r][\n]"
2018-10-16 18:05:19.234 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "Accept-Charset: big5, big5-hkscs, cesu-8, euc-jp, euc-kr, gb18030, gb2312, gbk, ibm-thai, ibm00858, ibm01140, ibm01141, ibm01142, ibm01143, ibm01144, ibm01145, ibm01146, ibm01147, ibm01148, ibm01149, ibm037, ibm1026, ibm1047, ibm273, ibm277, ibm278, ibm280, ibm284, ibm285, ibm290, ibm297, ibm420, ibm424, ibm437, ibm500, ibm775, ibm850, ibm852, ibm855, ibm857, ibm860, ibm861, ibm862, ibm863, ibm864, ibm865, ibm866, ibm868, ibm869, ibm870, ibm871, ibm918, iso-2022-cn, iso-2022-jp, iso-2022-jp-2, iso-2022-kr, iso-8859-1, iso-8859-13, iso-8859-15, iso-8859-2, iso-8859-3, iso-8859-4, iso-8859-5, iso-8859-6, iso-8859-7, iso-8859-8, iso-8859-9, jis_x0201, jis_x0212-1990, koi8-r, koi8-u, shift_jis, tis-620, us-ascii, utf-16, utf-16be, utf-16le, utf-32, utf-32be, utf-32le, utf-8, windows-1250, windows-1251, windows-1252, windows-1253, windows-1254, windows-1255, windows-1256, windows-1257, windows-1258, windows-31j, x-big5-hkscs-2001, x-big5-solaris, x-euc-jp-linux, x-euc-tw, x-eucjp-open, x-ibm1006, x-ibm1025, x-ibm1046, x-ibm1097, x-ibm1098, x-ibm1112, x-ibm1122, x-ibm1123, x-ibm1124, x-ibm1166, x-ibm1364, x-ibm1381, x-ibm1383, x-ibm300, x-ibm33722, x-ibm737, x-ibm833, x-ibm834, x-ibm856, x-ibm874, x-ibm875, x-ibm921, x-ibm922, x-ibm930, x-ibm933, x-ibm935, x-ibm937, x-ibm939, x-ibm942, x-ibm942c, x-ibm943, x-ibm943c, x-ibm948, x-ibm949, x-ibm949c, x-ibm950, x-ibm964, x-ibm970, x-iscii91, x-iso-2022-cn-cns, x-iso-2022-cn-gb, x-iso-8859-11, x-jis0208, x-jisautodetect, x-johab, x-macarabic, x-maccentraleurope, x-maccroatian, x-maccyrillic, x-macdingbat, x-macgreek, x-machebrew, x-maciceland, x-macroman, x-macromania, x-macsymbol, x-macthai, x-macturkish, x-macukraine, x-ms932_0213, x-ms950-hkscs, x-ms950-hkscs-xp, x-mswin-936, x-pck, x-sjis_0213, x-utf-16le-bom, x-utf-32be-bom, x-utf-32le-bom, x-windows-50220, x-windows-50221, x-windows-874, x-windows-949, x-windows-950, x-windows-iso2022jp[\r][\n]"
2018-10-16 18:05:19.235 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "Content-Length: 1362[\r][\n]"
2018-10-16 18:05:19.235 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "Host: .api.quickfile.co.uk[\r][\n]"
2018-10-16 18:05:19.236 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "Connection: Keep-Alive[\r][\n]"
2018-10-16 18:05:19.236 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "User-Agent: Apache-HttpClient/4.5.5 (Java/1.8.0_171)[\r][\n]"
2018-10-16 18:05:19.237 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "Accept-Encoding: gzip,deflate[\r][\n]"
2018-10-16 18:05:19.239 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "[\r][\n]"
2018-10-16 18:05:19.247 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "{[\r][\n]"
2018-10-16 18:05:19.248 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "  "payload" : {[\r][\n]"
2018-10-16 18:05:19.249 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "    "Header" : {[\r][\n]"
2018-10-16 18:05:19.249 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "      "MessageType" : "Request",[\r][\n]"
2018-10-16 18:05:19.250 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "      "SubmissionNumber" : "cde4caa0-dd97-413e-b75a-d95dd72b0748",[\r][\n]"
2018-10-16 18:05:19.250 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "      "Authentication" : {[\r][\n]"
2018-10-16 18:05:19.251 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        "AccNumber" : "######",[\r][\n]"
2018-10-16 18:05:19.252 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        "ApplicationID" : "######",[\r][\n]"
2018-10-16 18:05:19.253 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        "MD5Value" : "######"[\r][\n]"
2018-10-16 18:05:19.253 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "      }[\r][\n]"
2018-10-16 18:05:19.254 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "    },[\r][\n]"
2018-10-16 18:05:19.258 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "    "Body" : {[\r][\n]"
2018-10-16 18:05:19.261 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "      "ClientDetails" : {[\r][\n]"
2018-10-16 18:05:19.262 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        "CompanyName" : "My Test Company Limited",[\r][\n]"
2018-10-16 18:05:19.262 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        "AllowAttachPDF" : false,[\r][\n]"
2018-10-16 18:05:19.263 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        "AccountReference" : "PF00001",[\r][\n]"
2018-10-16 18:05:19.263 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        "AddressLine1" : "Office 6",[\r][\n]"
2018-10-16 18:05:19.264 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        "AddressLine2" : "222 Kensington High Street",[\r][\n]"
2018-10-16 18:05:19.265 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        "AddressLine3" : "Kensington",[\r][\n]"
2018-10-16 18:05:19.265 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        "Town" : "London",[\r][\n]"
2018-10-16 18:05:19.266 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        "CountryISO" : "GB",[\r][\n]"
2018-10-16 18:05:19.268 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        "Postcode" : "W8 7FG",[\r][\n]"
2018-10-16 18:05:19.270 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        "VatNumber" : "GB 100 100 100",[\r][\n]"
2018-10-16 18:05:19.278 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        "VatExempt" : "false",[\r][\n]"
2018-10-16 18:05:19.279 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        "Preferences" : {[\r][\n]"
2018-10-16 18:05:19.281 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "          "DefaultSendMethod" : "EMAIL",[\r][\n]"
2018-10-16 18:05:19.282 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "          "DefaultCurrency" : "GBP",[\r][\n]"
2018-10-16 18:05:19.282 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "          "DefaultTerm" : "14"[\r][\n]"
2018-10-16 18:05:19.283 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        }[\r][\n]"
2018-10-16 18:05:19.297 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "      },[\r][\n]"
2018-10-16 18:05:19.299 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "      "@xmlns" :.pi.quickfile.co.uk,[\r][\n]"
2018-10-16 18:05:19.301 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "      "ClientContacts" : {[\r][\n]"
2018-10-16 18:05:19.303 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        "DefaultContact" : {[\r][\n]"
2018-10-16 18:05:19.303 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "          "Surname" : "Smith",[\r][\n]"
2018-10-16 18:05:19.303 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "          "FirstName" : "John",[\r][\n]"
2018-10-16 18:05:19.315 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "          "TelephoneNumbers" : {[\r][\n]"
2018-10-16 18:05:19.317 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "            "Telephone" : [ "0207 111 1111", "0207 111 2222" ][\r][\n]"
2018-10-16 18:05:19.319 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "          },[\r][\n]"
2018-10-16 18:05:19.320 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "          "Email" : ".",[\r][\n]"
2018-10-16 18:05:19.343 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "          "Password" : "abc123"[\r][\n]"
2018-10-16 18:05:19.362 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "        }[\r][\n]"
2018-10-16 18:05:19.364 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "      }[\r][\n]"
2018-10-16 18:05:19.392 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "    }[\r][\n]"
2018-10-16 18:05:19.394 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "  }[\r][\n]"
2018-10-16 18:05:19.394 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 >> "}"
2018-10-16 18:05:20.186 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 << "HTTP/1.1 400 Bad Request[\r][\n]"
2018-10-16 18:05:20.188 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 << "Date: Tue, 16 Oct 2018 17:05:22 GMT[\r][\n]"
2018-10-16 18:05:20.190 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 << "Content-Type: application/json; charset=utf-16[\r][\n]"
2018-10-16 18:05:20.192 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 << "Content-Length: 142[\r][\n]"
2018-10-16 18:05:20.192 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 << "Connection: keep-alive[\r][\n]"
2018-10-16 18:05:20.193 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 << "Set-Cookie: __cfduid=de420f98caca8f5bcaed2aa94b132e46f1539709521; expires=Wed, 16-Oct-19 17:05:21 GMT; path=/; domain=..quickfile.co.uk; HttpOnly[\r][\n]"
2018-10-16 18:05:20.193 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 << "Cache-Control: no-cache[\r][\n]"
2018-10-16 18:05:20.194 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 << "Pragma: no-cache[\r][\n]"
2018-10-16 18:05:20.194 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 << "Expires: -1[\r][\n]"
2018-10-16 18:05:20.194 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 << "X-Powered-By: .ASP.NET[\r][\n]"
2018-10-16 18:05:20.195 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 << "Expect-CT: max-age=604800, report-uri="....https..://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"[\r][\n]"
2018-10-16 18:05:20.195 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 << "Server: cloudflare[\r][\n]"
2018-10-16 18:05:20.196 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 << "CF-RAY: 46ac1c1e2b143560-LHR[\r][\n]"
2018-10-16 18:05:20.197 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 << "[\r][\n]"
2018-10-16 18:05:20.197 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.wire                     : http-outgoing-8 << "[0xff][0xfe]{[0x0]"[0x0]E[0x0]r[0x0]r[0x0]o[0x0]r[0x0]s[0x0]"[0x0]:[0x0]{[0x0]"[0x0]E[0x0]r[0x0]r[0x0]o[0x0]r[0x0]"[0x0]:[0x0][[0x0]"[0x0]A[0x0] [0x0]c[0x0]l[0x0]i[0x0]e[0x0]n[0x0]t[0x0] [0x0]r[0x0]e[0x0]c[0x0]o[0x0]r[0x0]d[0x0] [0x0]w[0x0]i[0x0]t[0x0]h[0x0] [0x0]t[0x0]h[0x0]i[0x0]s[0x0] [0x0]n[0x0]a[0x0]m[0x0]e[0x0] [0x0]a[0x0]l[0x0]r[0x0]e[0x0]a[0x0]d[0x0]y[0x0] [0x0]e[0x0]x[0x0]i[0x0]s[0x0]t[0x0]s[0x0]"[0x0]][0x0]}[0x0]}[0x0]"
2018-10-16 18:05:20.199 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 << HTTP/1.1 400 Bad Request
2018-10-16 18:05:20.202 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 << Date: Tue, 16 Oct 2018 17:05:22 GMT
2018-10-16 18:05:20.203 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 << Content-Type: application/json; charset=utf-16
2018-10-16 18:05:20.204 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 << Content-Length: 142
2018-10-16 18:05:20.206 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 << Connection: keep-alive
2018-10-16 18:05:20.208 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 << Set-Cookie: __cfduid=de420f98caca8f5bcaed2aa94b132e46f1539709521; expires=Wed, 16-Oct-19 17:05:21 GMT; path=/; domain=...quickfile.co.uk; HttpOnly
2018-10-16 18:05:20.208 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 << Cache-Control: no-cache
2018-10-16 18:05:20.209 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 << Pragma: no-cache
2018-10-16 18:05:20.209 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 << Expires: -1
2018-10-16 18:05:20.210 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 << X-Powered-By: ..ASP.NET
2018-10-16 18:05:20.210 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 << Expect-CT: max-age=604800, report-uri="https://..report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
2018-10-16 18:05:20.214 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 << Server: cloudflare
2018-10-16 18:05:20.216 DEBUG 20288 --- [nio-8337-exec-1] org.apache.http.headers                  : http-outgoing-8 << CF-RAY: 46ac1c1e2b143560-LHR
2018-10-16 18:05:20.217 DEBUG 20288 --- [nio-8337-exec-1] o.a.http.impl.execchain.MainClientExec   : Connection can be kept alive indefinitely
2018-10-16 18:05:20.221 DEBUG 20288 --- [nio-8337-exec-1] o.a.h.c.protocol.ResponseProcessCookies  : Cookie accepted [__cfduid="de420f98caca8f5bcaed2aa94b132e46f1539709521", version:0, domain:quickfile.co.uk, path:/, expiry:Wed Oct 16 18:05:21 BST 2019]
2018-10-16 18:05:20.223 DEBUG 20288 --- [nio-8337-exec-1] h.i.c.PoolingHttpClientConnectionManager : Connection [id: 8][route: {s}->https://..api.quickfile.co.uk:443] can be kept alive indefinitely
2018-10-16 18:05:20.225 DEBUG 20288 --- [nio-8337-exec-1] h.i.c.DefaultManagedHttpClientConnection : http-outgoing-8: set socket timeout to 0
2018-10-16 18:05:20.226 DEBUG 20288 --- [nio-8337-exec-1] h.i.c.PoolingHttpClientConnectionManager : Connection released: [id: 8][route: {s}->https:/../api.quickfile.co.uk:443][total kept alive: 1; route allocated: 1 of 5; total allocated: 1 of 10]
org.springframework.web.client.HttpClientErrorException: 400 Bad Request
        at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:94)
        at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:79)
        at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63)
        at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:777)
        at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:730)
        at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:686)
        at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:437)
        at com.seelocal.server.controllers.QuickFileController.createClient(QuickFileController.java:90)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:870)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:776)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:881)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:855)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:158)
        at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:126)
        at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:111)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:84)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at com.seelocal.server.filter.TokenFilter.doFilter(TokenFilter.java:41)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
        at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:204)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
        at com.seelocal.server.filter.TokenFilter.doFilter(TokenFilter.java:41)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
        at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:96)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
        at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
        at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
        at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:157)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:200)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:790)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1459)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

It’s a bit hard to decipher because of the way the HTTPClient wire logging renders UTF-16 encoding into ASCII log messages, but this is the crucial bit, the body of the 400 response:

Converting this UTF-16 to readable text:

{"Errors":{"Error":["A client record with this name already exists"]}}

So your authentication is now working correctly and it’s a genuine error with the request you’re sending in. For future reference, there’s probably a way to get this info out of the HttpClientErrorException if you can catch it.

1 Like

Any ideas. i am running out of ideas?

@sampzz - What @ian_roberts mentions above would be the issue:

The error is being returned to you as part of the response. In this case, a client already exists on your account with the name you’re trying to use. If you change the client name to something different (and not already existing on the account), it should work all OK for you.

thank i figured it out.

This topic was automatically closed after 7 days. New replies are no longer allowed.