To accept an invitation to be a colleague, send an updated connection document in Atom format to the existing connection's edit web address.
After you accept a connection, the status of the connection in your connections is changed from pending to accepted and the status of the connection in the invitee's list of connections is changed from unconfirmed to accepted. To decline the invitation, delete it by sending a DELETE HTTP request to the resource.
All existing connection information will be replaced with the new data. To avoid deleting all existing data, retrieve any data you want to retain first, and send it back with this request. See Inviting a person to become your colleague
for more information.
To accept an invitation to be a colleague, send an updated connection document in Atom format to the existing connection's edit web address. The person who recieved the invite MUST be the one to accept - not the sender, a Profiles Admin can accept the invite also.
You can only accept or decline a connections invite if you know that you have a pending invite and who the invite is from, either by email or userid.
To decline the invitation, delete it by sending a DELETE HTTP request to the resource.
To accept a colleague invitation:
1. Retrieve any user's Profiles service document using the user's credentials to authenticate the request. See Retrieving the Profiles service document
2. In the service document, find the href attribute value where the value of the rel attribute is http://www.ibm.com/xmlns/prod/sn/connections/colleague
3. Append the parameter and value "status=pending" to the URI from step 2.
4. In the resulting feed, find the value of the href attribute where the value of the rel attribute is "self". The link should look similar to this:
5. Using the link from step 4, perform a PUT operation using an Atom entry document for the payload. Be sure to change the value of the term attribute of the category element with the attribute value of scheme="http://www.ibm.com/xmlns/prod/sn/status" from pending to accepted. The content type of the Atom entry document must be application/atom+xml. Note: this PUT request should use the credentials of the recipient of the invitation, not the sender.
See Authenticating requests for information about how to authenticate the request.