patreon-js icon indicating copy to clipboard operation
patreon-js copied to clipboard

User has specify pledge

Open varadig opened this issue 5 years ago • 3 comments

How can I get the current user is paid a specify pledge by api? I need to know, which tier is paid by the current usef.

varadig avatar Oct 30 '18 11:10 varadig

Hey @varadig -

You should be able to grab that information from campaigns in the API. Check out the docs here.

nperickson avatar Nov 01 '18 01:11 nperickson

Hi @nperickson

thanks, but it is not clear, how can I use the api V2 of patreon.

I tried on this way: https://www.patreon.com/api/oauth2/v2/campaigns/1410243 but I got:

{
    "errors": [
        {
            "code": 1,
            "code_name": "Unauthorized",
            "detail": "The server could not verify that you are authorized to access the URL requested.  You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required.",
            "id": "87716a1a-18c4-466c-a416-dfed51bb6417",
            "status": "401",
            "title": "Unauthorized"
        }
    ]
}

I tried also with access_token https://www.patreon.com/api/oauth2/v2/campaigns/1410243?access_token=XYZ but the result is the same

varadig avatar Nov 01 '18 08:11 varadig

I am also trying to get this accomplished. Adding this as an example to the tutorial would be great. I think this is the most useful thing you can do with the API.

jotego avatar Feb 21 '21 16:02 jotego