-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getting unauthorised error #16
Comments
Hi @zedherle, the URL in the |
Hi, i looked at the app property, indeed its a wrong url... but it should ideally pick it from there right? however i see them as "unused property", am i missing something? i am using idea community edition. cloudant.url=https://ca5401d9-c380-428e-acd9-bf4621b73e26-bluemix.cloudantnosqldb.appdomain.cloud/_all_dbs |
i am infact getting this error : 2020-10-02 16:40:25.245 ERROR 13756 --- [nio-8081-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.cloudant.client.org.lightcouch.CouchDbException: Error retrieving server response at https://null.cloudant.com:443/_all_dbs.] with root cause should the property be cloudant.account or cloudant.url ? - i tried both though... (documentation has both as well) |
Since you have the
|
for somehow, it does not work. Do you have any sample code/git reference for cloudant db connection so that i can verify. i searched for it and couldn't get. Am i doing app.properties right? |
however i had to do via Cloudant builder to make that work. btw - does app property has iam key attribute also?
|
Just to be clear the configuration file name is
You're using
No, IAM properties have not been added to this lib. You can open another issue to request this feature if you want it. Note that if you are using a legacy Cloudant API key it will not be authorized to |
Please read these guidelines before opening an issue.
Bug Description
1. Steps to reproduce and the simplest code sample possible to demonstrate the issue
I have put my client credentials in the application.prop like below
cloudant.url=https://ca5401d9-c380-428e-acd9-bf4621b73e26-bluemix.cloudantnosqldb.appdomain.cloud
cloudant.username=***************
cloudant.password=************
and then i have autowired as mentioned in the readme of this repository
@Autowired
private CloudantClient client;
through my controller i am calling this method to see if its working
public List getAllDbs() {
2. What you expected to happen
I am supposed to be getting right results with list of dbs available.
3. What actually happened
Currently it is throwing me errors like this below,
com.cloudant.client.org.lightcouch.CouchDbException: 401 Unauthorized at https://2a6085c6-394e-4a69-8074-6334f6b0c91a-bluemix.cloudant.com:443/_all_dbs. Error: unauthorized. Reason: one of _all_dbs, _admin, server_admin is required for this request.
But i do have right access. Not sure which part i am doing it wrong.
Environment details
com.cloudant
cloudant-spring-boot-starter
0.0.4
The text was updated successfully, but these errors were encountered: