Functions - register service

From The Socknet

Jump to: navigation, search

register_service is used by a Service to request permanent access to a user's profile.

Specification

POST register_service
{ from: { serviceid: "http://photosite.com/agents",
          protocols: { "http://photostandards.com/photoxchange": 
                       { public_data: ... anything at all ...
                       }
                     }
        },
  notification: true,
  return: "http://photosite.com/UserA/registration-complete"
}

->
{ accepted: boolean 
}

register_service is called via POST.

The request must have a from field which must describe a Service.

The from field may have a protocols field which holds an object with protocol names for keys which hold objects with a public_data field which may hold any data.

The public_data field is subject to field_limits.

The request may have a notification field holding a boolean which indicates that the service would like to receive message notifications.

The request should have a return field.

The response is an accept or a redirect. If the service is already registered, any changed data will be saved, and the response will be a true accept.

Support

Providers must support this function.

Services have no use for this function.

Further Reading

Personal tools