Skip to main content
Question

REST Web Service using Credential Values from Locker w

  • February 10, 2023
  • 10 replies
  • 313 views

Forum|alt.badge.img+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

Forum|alt.badge.img+6
  • Navigator | Tier 3
  • February 10, 2023

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.


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • February 10, 2023

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


rbkadiyam
Premier Pathfinder | Tier 7
Forum|alt.badge.img+17
  • Premier Pathfinder | Tier 7
  • February 13, 2023

@Trent RPA You have to use x-authentication key 

 


rbkadiyam
Premier Pathfinder | Tier 7
Forum|alt.badge.img+17
  • Premier Pathfinder | Tier 7
  • February 13, 2023

@Trent RPA 

 


Forum|alt.badge.img+22
  • Most Valuable Pathfinder
  • February 13, 2023

Hi @Trent RPA 

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


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • February 13, 2023

@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.


Forum|alt.badge.img+22
  • Most Valuable Pathfinder
  • February 13, 2023

Hi @Trent RPA 

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


rbkadiyam
Premier Pathfinder | Tier 7
Forum|alt.badge.img+17
  • Premier Pathfinder | Tier 7
  • February 13, 2023

@Trent RPA 

 


Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • February 13, 2023

@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 🙂


rbkadiyam
Premier Pathfinder | Tier 7
Forum|alt.badge.img+17
  • Premier Pathfinder | Tier 7
  • February 14, 2023

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