How to pass a string pointer to a function
What you have there are not String objects, but string literals. Their type is const char *

You should avoid using String objects if at all possible. Instead use character arrays.

To get a character array out of a function it is best to create one outside your function and pass it to the function as one of the parameters. The return value of the function can then be a status value indicating if the call worked or not.