Authentication
After receiving an authentication token access_token
from the partner authentication or registration endpoints, this
token can be used to access any of the panel endpoints.
Example using access tokens
Access tokens should be placed as Bearer tokens to all panel endpoints. Below is a sample for accessing the panelist's account details and setting the access tokens:
- cURL
- Node
- Python
- Go
curl --location --request GET 'https://api.sandbox.pureprofile.io/v1/panel/account' \--header 'Accept: application/json' \--header 'Authorization: Bearer <access_token>'
var axios = require("axios");var config = { method: "get", url: "https://api.sandbox.pureprofile.io/v1/panel/account", headers: { Accept: "application/json", Authorization: "Bearer <access_token>", },};axios(config) .then(function (response) { console.log(JSON.stringify(response.data)); }) .catch(function (error) { console.log(error); });
import requestsurl = "https://api.sandbox.pureprofile.io/v1/panel/account"payload={}headers = { 'Accept': 'application/json', 'Authorization': 'Bearer <acess_token>'}response = requests.request("GET", url, headers=headers, data=payload)print(response.text)
package mainimport ( "fmt" "net/http" "io/ioutil")func main() { url := "https://https://api.sandbox.pureprofile.io/v1/panel/account" method := "GET" client := &http.Client {} req, err := http.NewRequest(method, url, nil) if err != nil { fmt.Println(err) return } req.Header.Add("Accept", "application/json") req.Header.Add("Authorization", "Bearer <access_token>") res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body))}