Set Individual Credentials (set_individual_credentials)

Post Reply
User avatar
ccbug_admin
Member
Posts: 106
Joined: Wed Oct 14, 2015 8:06 pm

Set Individual Credentials (set_individual_credentials)

Post by ccbug_admin » Sat Sep 02, 2017 4:35 pm

Service Description:
If a profile does not already have an account associated with it, this will create an account for the associated profile. If the profile already has an account associated with it, this will reset the account username and password associated with the account.
Potential Uses:
  • Create an account (username/password) associated with a given profile.
  • Reset an account (username/password) associated with a given profile.
Important Notes:
  • This API used to work with the "GET" method but was changed to require the "POST" method on September 8th, 2016.
  • Tim Koop notes that the service returns "system error occurred" if one doesn't include a password that is at least six characters long and included both alpha and numeric characters.
  • Tim Koop also notes that, "srv=individual_id_from_login_password" is submitted with GET while password and login are submitted with POST.
  • One cannot use query string parameters with a POST method, it has to be passed as data. Postman is helpful in that one can setup the post with its data key/values and then export it as code in a number of different (programming) languages.
Implementation:
For Curl:

Code: Select all

curl -u username:password -d "id=952&username=newusername&password=newpassword" "https://yourchurch.ccbchurch.com/api.php?srv=set_individual_credentials"
Response:

Code: Select all

<response>
 <service>set_individual_credentials</service>
 <service_action>execute</service_action>
 <availability>public</availability>
 <individuals count="1">
 <individual id="952"
 <name>Person Name</name>
 <login>newusername</login>
 <success>true</success>
 </individual>
 </individuals>
</response>
Alternatives:
  • None.
See:

Post Reply