Discourse settings and successful API calls

I have a Discourse site running as SSO client for WordPress. I have a custom user profile on WP. I want to lock down the duplicate settings on the Discourse side as far as possible. My php developer has implemented API calls to update the name field and avatar in Discourse. There are also some custom fields that get updated. Also a number of groups. To get the avatar field to update in our sandbox I had to change the Discourse setting to allow users to update their avatar. On the production site I had to allow both editing of the name field and the avatar to get each to work. The custom fields, while non-editable by non-admins update as they should on both the sandbox and production site. Groups update fine. Site settings are the same on both installs but there are multiple Discourse settings that I think might be influencing this behavior and I may have had things temporarily checked on one site and not the other.

So my questions are:

  1. Should I have to make name and avatar user-editable to get successful updates through the API?
  2. If so, why the difference in behavior between the sandbox and the production site?
  3. If not is this behavior a Discourse bug?

I don’t know about all of those questions, but most of those user fields can be updated via the SSO interface rather than the API. This is certainly true for the avatar and group membership. I would have your developer look at the topics here about wp discourse and sso.

1 Like

Thanks for the response. We definitely started with the functions available through the SSO plugin. We sought some input from other developers on this site and received helpful feedback…but ultimately were unsuccessful on that front. API calls are working just fine but I would like to make them without having the Discourse settings dependencies. Similar Discourse settings dependencies may have been preventing our successful calls through the SSO plugin functions. I don’t think we experimented with that at the time. It is speculation at this point but maybe it is something we will look in down the road.