Question

REST Web Service using Credential Values from Locker w

  • 10 February 2023
  • 10 replies
  • 163 views

Userlevel 1
Badge +1

Hello,

I’m trying to do the following authenticate using the post method instructed here - Authenticate with username and password (automationanywhere.com)

And while the following works:

{

"username": "your-domain\\jdoe",

"password": "mypassword@123"

}

I want to use my credential variables from my locker instead but that throws up an error:


{

  "username": "DOMAIN\\$TEST(Username)$",

  "password": "$TEST(Password)$"

}

 

The resulting error is - {"code":"UM1110","details":"This may be due to a misspelling or because your Caps Lock is on. To continue, please retype your username and password.","message":"Either your domain or your username or your password is incorrect"}

I would like to make it so that it’d be able to run no matter who is using it (so $$User$(Username)$) but at the moment I can’t even seem to get it to retrieve the Username correctly from the vault. Is there any way to assign it dynamically?


10 replies

Userlevel 3
Badge +6

There’s a new option, this will automatically authenticate with current user.

 

Other option:

You can try following: https://botstore.automationanywhere.com/bot/a2019-credential-manager-package

This will allow you to read credential and assign to string.

Userlevel 1
Badge +1

There’s a new option, this will automatically authenticate with current user.

 

Other option:

You can try following: https://botstore.automationanywhere.com/bot/a2019-credential-manager-package

This will allow you to read credential and assign to string.

Sorry, I forgot to mention I’m using Enterprise 11.3.5

Userlevel 5
Badge +10

@Trent RPA You have to use x-authentication key 

 

Userlevel 5
Badge +10

@Trent RPA 

 

Userlevel 6
Badge +12

Hi @Trent RPA 

Make sure you mast sensitive information like Auth key while sharing the screenshots in public forums.

Userlevel 1
Badge +1

@Trent RPA

 

Hello @rbkadiyam 

Is there anyway to do this in the client version by anychance?

I’ve created a POST with the same parameters and it seems to not be working.

Userlevel 6
Badge +12

Hi @Trent RPA 

Have you passed this in the header? Can you share the error screenshot?

Userlevel 5
Badge +10

@Trent RPA 

 

Userlevel 1
Badge +1

@Trent RPA

 

I’ve passed the parameters into the headers earlier but it seems to be throwing back a 400 error.

I appreciate the time and effort though man - even if we can’t get it working this way we’ll figure something out on side 🙂

Userlevel 5
Badge +10

@Trent RPA  have you added ‘authorization’ as name and values as ‘Bearer <token>’ there should be space between bearer and token… This should work 

Reply