@cderv
Thanks for the tips, that has been really helpful.
What I have ended up doing is using httr to reset the handle.
So, firstly, I had to find the correct url to use for the handle.
httr::handle_find(apiendpoint_url)
Which returned the required url to use in the handle
I can then set handle
custom_h <- httr::handle("https://someurl/")
adding the handle option to my previous GET and POST commands:
httr::GET('https://internalcompanyserver/apiendpoint_parameters', handle = custom_h)
result = httr::POST('https://inetrnalcompanserver/auththingy', body = login, encode = 'form', handle = custom_h)
Then I need to reset the handle by:
httr::handle_reset(custom_h$url)
custom_h <- httr::handle("https://someurl/")
And then I can run new GET and POST commands.
I've found out that the api is using a basic authentication method (so not Oauth2).