gandi-api icon indicating copy to clipboard operation
gandi-api copied to clipboard

Invalid API key

Open mwei0210 opened this issue 7 years ago • 0 comments

Hi, The api key was extracted from https://account.gandi.net/en/users/$USERNAME/security at row Production API key for LiveDNS

here's the error I get even though the API key is correct

Livedns system type request error: bad status code - 405 here's a brief demonstration:

package main

import (
    "fmt"
    gandi "github.com/prasmussen/gandi-api/client"
    "github.com/prasmussen/gandi-api/live_dns/domain"
)

const (
    apikey = "myapikey"
)

func main() {
    c := gandi.New(apikey, gandi.LiveDNS)
    z := domain.New(c)
    zl, err := z.List()
    if err != nil {
        panic(err)
    }
    for _, v := range zl {
        fmt.Println(v)
    }
}

mwei0210 avatar Aug 10 '18 10:08 mwei0210