Hello all, I am currently running API automation By Robot Framework and am required to pass my API Key as well

Logged in as PXWhite user
@{auth} Create List ${User_Name} ${Password}
Create Session PxWhiteSession ${Base_Url} auth=${auth}
${Header} Create Dictionary api-key=${api_Keys} Content-Type=application/json
${Body} Create Dictionary user=userid password=password applicationId=${application_ID}
${response} POST On Session PxWhiteSession endpoint headers=${Header} data=${Body}
Am I using using the correct way? or How I can Pass the API Key please suggest…

Hi Abinashbeura,

Maybe you’re doing it right, maybe not, it depends on what your API expects, we can’t know that, you’ll have to ask your API developers.

They might give you a PostMan example, or some reference documentation that will tell you if you need to put the API key in the headers (like you did here), as a cookie, or in the post body.

Dave.

2 Likes