I’m trying to include total_historical_amount_cents in a call to current/user. So far I haven’t had any luck using the PHP library.
Similarly, I get a 400 error, “Invalid value for parameter ‘Unknown’.” When trying to add include variables to the PHP library call
https://www.patreon.com/api/oauth2/api/current_user?fields[user]=like_count,comment_count
public function fetch_user($parse = true) {
return $this->__get_data("current_user?fields[user]=like_count,comment_count", $parse);
}
1 Like
cham
December 14, 2017, 10:23pm
3
Try This:
"current_user?fields%5Buser%5D=like_count,comment_count"
Percent-encoding, also known as URL encoding, is a mechanism for encoding information in a Uniform Resource Identifier (URI) under certain circumstances. Although it is known as URL encoding it is, in fact, used more generally within the main Uniform Resource Identifier (URI) set, which includes both Uniform Resource Locator (URL) and Uniform Resource Name (URN). As such, it is also used in the preparation of data of the application/x-www-form-urlencoded media type, as is often used in the submis...
1 Like
I’m glad this post was here. Does the documentation actually say this anywhere? I think It’s kind of absurd the example they give you won’t work without percent-encoding…