0

I am trying to learn robot framework and I am trying to connect my https API using BASIC authentication. Can anyone help me to start with initial setup ?
Attached is the screenshot how Iam currently connecting the REST API.

An example I found on GITHUB looked promising but no idea how to use it in my case. https://github.com/jjwong/RESTinstance_starter_project/blob/master/tests/test_basic_authentication.robot enter image description here

enter image description here

3
  • Please reduce the size of your images and only show the relevant part so that we do not need to click on it to actually see the details and we have no white blocks. Additionally can you share with us what you've already tried and what you observed. Commented Dec 13, 2018 at 6:37
  • In your case you want to make api call with auth token?? Commented Dec 13, 2018 at 6:38
  • 2
    Possible duplicate of How to pass credentials to RESTinstance POST Request in robot framework? Commented Dec 13, 2018 at 6:39

1 Answer 1

2

You might need to add your username and password in headers of your request like

Authorization    Basic username:password

Note you need to encode it with base64.

In case of Token based authentication

Authorization    Bearer ${jwt_token}
Sign up to request clarification or add additional context in comments.

1 Comment

The base64 encoding is not "might", it is required by the protocol. Note you're not answering the actual question "How to pass basic authentication to API call in robotframework".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.