"Authentication" header not accepted in Outbound REST API

soibam_ana_sing
Giga Contributor

We are integrating SNOW with a 3rd party software and making Outbound rest api from SNOW endpoint. For authentication on 3rd party software, it does take only JWT (JSON Web token), not Basic Authentication. Below is how I pass auth token in POST method. Its seems that token is not accepeted in header field in Outbound method from SNOW side.

I also tried same POST method in POSTMAN and its work fine. Since it is working in POSTMAN, I am expecting same result in SNOW side also. 

 

 

Endpoint : http://a.b.c.d:3000/api/v1/map/launch/14

Accept: application/json

Content-type: application/json

Authorization: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoiYWRtaW4iLCJpYXQiOjE1NzAxODY3MjcsImV4cCI6MTU3MDI3MzEyN30.oqK1n1LicDD2InCYBGrpkmIA"

Outbound POST Method in SNOW:

find_real_file.png

 

could someone help me on this issue ?

1 ACCEPTED SOLUTION

Thanks for your reply.

I have tried with/without key work "Bearer" (with space) ,it same error messages. In POSTMAN, its working fine , even without 'Bearer" in Authentication header. 

Does SNOW REST APIs expect "Bearer" if authorization header is used in any REST APIs calls? 

View solution in original post

14 REPLIES 14

Lukasz Bojara
Kilo Sage

Hi,

How do you pass the token in the header? Do you use the Bearer schema? If not then you should send the token this way:

 

Authorization: Bearer <token>

 

so

 

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoiYWRtaW4iLCJpYXQiOjE1NzAxODY3MjcsImV4cCI6MTU3MDI3MzEyN30.oqK1n1LicDD2InCYBGrpkmIA

 

The JWT typically uses this schema. Remember that there must be a space between the work Bearer and the token.

 

If my answer helped you in any way, please then mark it as helpful. If this solved your case please mark it as a correct answer. Thank You.

Best regards,
Łukasz

 

Thanks for your reply.

I have tried with/without key work "Bearer" (with space) ,it same error messages. In POSTMAN, its working fine , even without 'Bearer" in Authentication header. 

Does SNOW REST APIs expect "Bearer" if authorization header is used in any REST APIs calls? 

The Bearer is not expeced by SNOW it but it this is a common way that API that you call use this schema.

Is it possible for you to share the configuration of your HTTP POST method configuration? Also do you have an example from this API documentation how should you call it and share it? Many issues with REST calls are connected to the specifics of the endpoint.

find_real_file.png