TestProject Forum

How to pass a Token through on a GET using the Restful API extension

Hey, first time user here.

I am trying to use the RESTful API Client extension to do some API testing and in one of my API I am calling a GET, in this call I need to pass a token through but I can’t see to be able to push this token through.

I have tried entering token=x-x into all the fields (i.e Qeury, headers, HeaderDelimiter, body and format and the API is still coming through as unauthorised as it needs the token to pass through for my get API to pull back data.

Does anyone know where I am going wrong, Thanks in advance

Steve?

I managed to resolve this myself, For future info out there, you need to pass through a Bearer token as Authorization=Bearer Token_Name
so in my case for my token what I would put in the field is
Authorization=Bearer x-x

@sm1

You are absolutely right.
It should be part of the headers: Authorization=Bearer Token_Name as you wrote.