Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API error on GET #70

Open
emerikaji opened this issue Jun 21, 2023 · 0 comments
Open

API error on GET #70

emerikaji opened this issue Jun 21, 2023 · 0 comments

Comments

@emerikaji
Copy link

I've been trying to get the API working for some time now, to use the /ip route in my Go code. While I did manage to get it working for some time, it suddenly started to refuse my requests, responding with a 401: "You must login first".

I don't understand why this is the case, as my API authorization is still perfectly valid, and I have checked that the ovh.Client properly got all the information from the ovh.conf file- So what else is there to do to authentify?

For additionnal information, here is the code I am using to initialize and request on the API:

client, err := ovh.NewEndpointClient("ovh-eu")
if err != nil {
    return err
}
var res = make([]string, 0)
if err = checker.client.Get("/ip", &res); err != nil {
    return err
}
fmt.Println(res)

I did try using Ping(), just in case the problem came from reaching the API, but it didn't return any errors. Is it a problem on my end?
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant