I’m trying to create REST API call to OpenWeatherMap, it requires to send APPID key for authorization. I’ve created new Authorization Profile of api_key type and trying to test it (url, key, content-type and method provided).
It fails, but the problem is that I have no idea why and how reasons (e.g. response) could be extracted. There’s no window or further data to follow up, just a pop-up with text ‘my authorization profile name test failed’ cryptic message (see pic below).
Tried and re-created multiple times with the very same outcome.
Cross-checked my credentials with Postman and Node.js script - all is fine.
Please give me a hand here - how can I access to log or response data to understand whats wrong with my settings?
API key based integration only expect you to pass the key in the query while hitting the api… Why not pass it part of the API itself instead of using the Auth profile?
You will select the HTTP Methods as per the API functionality(there is no mandatory value for it). The Method attribute needs to be given value while testing the Authorization profile.
Let us know if you are facing any issue while selecting other Methods than “GET”.
Unfortunately I am experiencing the same cryptical error message but for Basic Auth Authorization Profile. In this case as well, the documentation seems to not be up to date. Is there really no possibility to troubleshoot the error, view logs or debug somehow? The same authentication REST call from a service node works fine when testing, but it would be great to have a username / password form, which can be used for all services, as with Auth.
We infer from your post that you are able to execute the API in the service node while sending the username and password as headers.
But, while you are setting up an auth profile for Basic authentication, then it is not working.
If our understanding is correct, please send us the screenshot of the Authorization profile configuration. Also, send us the screenshot of the error.
@yogaramya.mendu: thank you for your reply. I am happy to provide all required information and screenshot.
For the WebService calling the authentication REST API, the username and password are sent in the body, not in the headers. In case of successful authentcation, the server response with code 200, will contain a token in the body, which then can be used for futre API calls, to not have to repeat the authentication. This works fine, but it’s quite some logic that I have to replicate for each task, leading to a repetitive and error-prone duplicate work. I’m sure there must be an easier way to do this and I thought Auth Profile + Auth in the Service Node would be the way.
Screenshot of the Authorization profile configuration:
As a new user, I am only allowed to post one picture in a post, that’s why I can’t post the screenshot of the error. But it is exactly like the picture of the first author in this thread: " test failed". It doesn’t reveal much unfortunately.
many thanks for your efforts, but the problem seems to be on our side. I talked to my colleague and our API seems to not support Basic Auth, but it instead uses JSON Web Token (JWT), for generating the token I was saying about.
Furthermore I have managed to build a sub-inent for the authentication logic using Digital Form , so there is no need for any duplication ( as mentioned in point 1). It was only my lack of experience, so sorry for bothering you with this.