Closed thiagorova closed 4 years ago
You have to request the fields you to query specifially, do you do that? See here, at 2): https://docs.patreon.com/#what-39-s-new
All data attributes and relationships must be explicitly requested with the fields and include query params. In v1, the server would return certain attributes and relationships by default. Now, in v2, no data other than type and id will be returned for a resource unless it is requested.
That means, that you will add query parameters to the URL.
/identity
endpoint, you can see in the endpoint documentation that it fetches a User
resourceUser
resource provides a set of fields, e.g. full_name
and vanity
.https://www.patreon.com/api/oauth2/v2/identity?fields[user]=full_name,vanity
When you are testing that, you will run into an error, because the character [
and ]
are not urlencoded, so you need to change that accordingly: [
is %5B
and ]
is %5D
, so fields[user]..
becomes fields%5Buser%5D=...
aha, thanks a lot! I had actually read that on the docs, but (to be honest) it hadn't really clicked. It makes a lot more sense now! Thanks a lot, and sorry for the trouble!
Hello. For starters, I'm not sure if the problem is with me or not, to be quite frank. If this is somehow my fault, I'm sorry.
I have a creator account in Patreon and recently I made another, personal one, in order to test the Patreon API for my application. After properly dealing with the OAuth (requesting the
identity scope
), I made an identity GET request tohttps://www.patreon.com/api/oauth2/v2/identity
. I keep getting the same results:What bothers me is just that the attributes field is empty (I have not made any pledge yet, so my relationship data being empty is more than expected. I have checked my own account to check if there are any privacy settings, but didn't find anything either.
any help would be greatly appreciated, and thanks again!