Reputation: 5646
I am trying to get all the webhooks registered on my boards.
On the Trello developers website, it states the following URL to get the array of webhooks:
GET /1/tokens/[token]/webhooks
When I try this with my token and app key, I get an empty array ([]
) back.
In the sandbox, however, it uses a different URL for the same call, and it gives me the response I expected.
GET /members/me/tokens?webhooks=true
But when I try this in my code, I get "unauthorized member permission requested."
How do I get the list of my webhooks through my code?
Upvotes: 1
Views: 373
Reputation: 151
Both requests you mentioned will work as long as the user token and application key are supplied in the correct places:
GET /1/tokens/[USER_TOKEN]/webhooks?token=[USER_TOKEN]&key=[APPLICATION_KEY]
GET /1/members/me/tokens?webhooks=true&token=[USER_TOKEN]&key=[APPLICATION_KEY]
The
me
keyword in the second request corresponds to the user whose token is supplied in the query parameter. See the Trello API Reference: GET /1/members/[idMember or username]
Upvotes: 1