REST API: GET profile

Warning: You are viewing the documentation for the old REST API. We recommend using version 2 of the REST API.

This is a simple method to request all information from a profile given its ID. The profile information can be requested with an HTTP GET call to the following URL:$id?access_token=xxxx

The $id should be replaced with the numerical identifier of the profile you're requesting the information of.

Returned fields

This method returns profile information. The profile object contains the following properties:

  • ID: numerical ID of the profile
  • database: ID of the database where the profile is stored
  • secret: the "secret" code linked to a profile
  • created: timestamp for creation of profile in YYYY-MM-DD hh:mm:ss format
  • modified: timestamp for last edit of profile in YYYY-MM-DD hh:mm:ss format
  • fields: associative array / object of field names and values
  • interests: array of the interests of the profile

PHP example

The following PHP script demonstrates how to call the API method.

// dependencies

// change this into your access token
$api = new CopernicaRestApi("your-access-token");

// do the call, and print result

The example above requires the CopernicaRestApi class.

More information