@EconomiCurtis Thanks for the reply.
Yes, I did mask the website name in the post. Also, This API has authentication with API Key.
I passed the username as variable & tried as below, still got the same error.
url_ben <- 'https://anonymoususer.org/api'
repost <- GET(url = paste0(url_ben,'users/',username,'/repost'))
Error in curl::curl_fetch_memory(url, handle = handle) :
Unable to communicate securely with peer: requested domain name does not match the server's certificate.
Thanks for pointing me the post, but it's not relevant to this issue.