For a deeper look into our World Check One API, look into:

Overview |  Quickstart |  Documentation |  Downloads

question

Upvotes
1 0 1 2

401-Not Authorized - world check api

2022-11-27 20_08_45-eclipse-workspace - worldCheckApitSample_src_main_java_com_world_check_api_world.png

Hi Team,


We are planning to consume “screeningRequest” details from world check api


Can you please help us on the issue?


Let us know if you need any other details.



Request: https://api-worldcheck.refinitiv.com/v2/cases/screeningRequest


Request Body: Attached Sample Java code



Response:


SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

SLF4J: Defaulting to no-operation (NOP) logger implementation

SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

NettyResponse {

statusCode=401

headers=

Date: Sun, 27 Nov 2022 14:30:37 GMT

Connection: keep-alive

Authorization: WWW-Authenticate: Signature realm="World-Check One API",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length"

Content-Security-Policy: default-src 'none'; frame-ancestors 'none'

Strict-Transport-Security: max-age=15552000; includeSubDomains

X-Frame-Options: DENY

X-XSS-Protection: 1; mode=block

X-Content-Type-Options: nosniff

content-length: 0

body=


}


Uploaded sample project for reference, can you please help us on Priority?

Let us know if you need any other details.worldCheckApitSample.zip

#technology#productjavaworldcheck-one-apierror-401
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @cheenie

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS

Upvotes
546 4 0 2

Hi @cheenie.


I did some digging and found out a possible solution could be adding these dependencies in your pom.xml file. PFA the following code -


<dependency>

<groupId>org.apache.logging.log4j</groupId>

<artifactId>log4j-api</artifactId>

<version>2.14.1</version>

</dependency>

<dependency>

<groupId>org.apache.logging.log4j</groupId>

<artifactId>log4j-core</artifactId>

<version>2.14.1</version>

</dependency>

<dependency>

<groupId>org.apache.logging.log4j</groupId>

<artifactId>log4j-slf4j-impl</artifactId>

<version>2.14.1</version>

</dependency>

(or)

<dependency>

<groupId>org.apache.logging.log4j</groupId>

<artifactId>log4j</artifactId>

<version>2.14.1</version>

</dependency>


<!-- SLF4J Bridge -->

<dependency>

<groupId>org.apache.logging.log4j</groupId>

<artifactId>log4j-slf4j-impl</artifactId>

<version>2.14.1</version>

</dependency>


Could you please try the above and get back to me? Thank you.

Regards,

Ssneha Balasubramanian.



icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi BalaSubhramanian,

thanks for the update, But we have updated out dependencies still not able to get the valid response.

Error Response:

NettyResponse {

statusCode=401

headers=

Date: Mon, 28 Nov 2022 03:57:52 GMT

Connection: keep-alive

Authorization: WWW-Authenticate: Signature realm="World-Check One API",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length"

Content-Security-Policy: default-src 'none'; frame-ancestors 'none'

Strict-Transport-Security: max-age=15552000; includeSubDomains

X-Frame-Options: DENY

X-XSS-Protection: 1; mode=block

X-Content-Type-Options: nosniff

content-length: 0

body=


}


Attached updated Pom.xml file

pom.txt

Upvotes
546 4 0 2

Hi @cheenie.


I can't find any log4j dependencies in the pom.xml file of the folder. Is it available in another file? Thank you.


Regards,

Ssneha Balasubramanian.




icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi Ssneha Balasubramanian ,


Attached pom.xml file here pom.txt


Let me know if you need any other details

Attached updated project
worldCheckApitSample.zip

pom.txt (1.4 KiB)
Upvotes
546 4 0 2

Hi @cheenie.


I found another solution requiring to add this jar file - https://repo1.maven.org/maven2/org/slf4j/slf4j-simple/1.6.2/slf4j-simple-1.6.2.jar. Could you add this and try again? Thank you.


Regards,

Ssneha Balasubramanian.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi Ssneha Balasubramanian,

even after updating slf4j jar Subjected issue is not resolved

can you please run the App.java file available in the attachment sample project?

because issue might not be relate to Logger Jar file


worldCheckApitSample.zip

Upvotes
546 4 0 2

Sure.


I'm running it on my end. Will update in a bit. Thank you.


Regards,

Ssneha Balasubramanian.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
546 4 0 2

Hi @cheenie.


In the java file, one of the headers is GET request and groups/v1/ endpoint but screening request of individual has been passed. These are not compatible. Could you look into this? Thank you.

Regards,

Ssneha Balasubramanian.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

as per comments I have removed suggested header, Still not able to resolve the issue.


Attached code reference.


worldCheckApitSample.zip

Upvotes
546 4 0 2

Hi @cheenie.

Just wanted to confirm if all the jar files have been added to the classpath? Thanks.


Regards,

Ssneha Balasubramanian.



icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi ,


all jar are available in the classpath, we are getting not authorized error

if you observe statusCode=401 i.e Not authorized error.

can you please help us on the issue?


Error details

statusCode=401

headers=

Date: Mon, 28 Nov 2022 07:06:32 GMT

Connection: keep-alive

Authorization: WWW-Authenticate: Signature realm="World-Check One API",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length"

Content-Security-Policy: default-src 'none'; frame-ancestors 'none'

Strict-Transport-Security: max-age=15552000; includeSubDomains

X-Frame-Options: DENY

X-XSS-Protection: 1; mode=block

X-Content-Type-Options: nosniff

content-length: 0


1669619182888.png

1669619182888.png (197.8 KiB)
Upvotes
546 4 0 2

Hi @cheenie.


Could you post a picture of the error message fully? Thank you.


Regards,

Ssneha Balasubramanian.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

NettyResponse {

statusCode=401

headers=

Date: Mon, 28 Nov 2022 07:17:13 GMT

Connection: keep-alive

Authorization: WWW-Authenticate: Signature realm="World-Check One API",algorithm="hmac-sha256",headers="(request-target) host date content-type content-length"

Content-Security-Policy: default-src 'none'; frame-ancestors 'none'

Strict-Transport-Security: max-age=15552000; includeSubDomains

X-Frame-Options: DENY

X-XSS-Protection: 1; mode=block

X-Content-Type-Options: nosniff

content-length: 0

body=


}



1669619911478.png

1669619911478.png (114.0 KiB)
Upvotes
546 4 0 2

Hi @cheenie.


Could you check this website Time.is 02:40am and let me know what time difference you are getting? Thank you.


Regards,

Ssneha Balasubramanian.



icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi Ssneha Balasubramanian.
1669626625477.png

1669626625477.png (88.2 KiB)
Upvotes
546 4 0 2

Hi @cheenie.


The time difference looks good. Can you tell me how long it has been since the pilot account details have been assigned? The error could be because of an expired key. Thank you.


Regards,

Ssneha Balasubramanian.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
546 4 0 2

Hi @cheenie.


Any updates from your end regarding this? Thank you.

Regards,

Ssneha Balasubramanian.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.