guild api issues

guild api issues

in API Development

Posted by: Anhim.3156

Anhim.3156

Ok, so I know this will be something I am doing wrong but for the life of me I can’t figure out what…

I’ve got an account with 5 guilds; 2 of which I am leader of. I went to that account’s api section on the website and got an API key for account&guild. Now if I try https://api.guildwars2.com/v2/guild/<insertIdHere>/log , or any other /v2/guild endpoints; I always get the error “endpoint requires authentication”. I’ve checked my mails in case it was that but couldn’t find anything… so how exactly do I go about ‘authenticating’ an API key that I generated?

Many thanks for any clarification,

Darqam

guild api issues

in API Development

Posted by: Lawton Campbell

Lawton Campbell

Web Programmer

Next

Private message me the full URL you’re using (with the API key) and I can take a look.

https://api.guildwars2.com/v2/guild/123/log?access_token=456 (where “123” is the guild id and “456” is the API key) should work fine; not sure what’s wrong. That error message should only appear if the API key doesn’t get passed correctly, AFAIK.

guild api issues

in API Development

Posted by: Anhim.3156

Anhim.3156

Oh… well then what I am missing is definitely the id. What I had done was https://api.guildwars2.com/v2/guild/<APIkey>/log.

So where does one get the guild id?

guild api issues

in API Development

Posted by: Lawton Campbell

Previous

Lawton Campbell

Web Programmer

You can get the guild ids from /v2/account, or you can look them up by name in /v1/guild_details.json.

guild api issues

in API Development

Posted by: Abominable Snowman.2036

Abominable Snowman.2036

You can use v1/guild_details if you know the name.

guild api issues

in API Development

Posted by: Anhim.3156

Anhim.3156

Thank you for the details.