Authorization Bearer token - get/post


Hello, I’m a beginner in the automation area and having a problem with the bearer token. Can you help me?

*** Variables ***
${URL_API_BASE} http://localhost:3000
${AUTH_BEARER} USDHSADOASSAJISAJODjasjdsidji
*** Keywords ***

listo todas as tag e valido se estão todas presentes
Create Session API ${URL_API_BASE} verify=true
${headers}= Create Dictionary Content-Type=application/json Authorization=${AUTH_BEARER}
${response}= GET On Session API /tags headers=${headers}
Log ${response}

you should do :
${headers}= Create Dictionary Content-Type=application/json Authorization=Bearer ${AUTH_BEARER}

2 Likes

Thank you very much! It worked.

2 Likes