Child pages
  • Using Client Token Authentication
Skip to end of metadata
Go to start of metadata

Introductions

This is a technical reference on how to approach large scale request authentication with the phz.io API.

Locating Your Client Token

You'll be using your Client Token for all of the requests you make in your application. This token is considered very sensitive to the API, and should be used according to the best practices of your language. Please avoid hard-coding this value anywhere in your application for security & performance reasons.


Step 1

Login to the phz.io console with your username (which may be your email address) and password.

Step 2

Visit the "Account Management Home" page.


Step 3

Click the "Access My Client Token" button.  You may highlight and copy your client token, or click the clipboard icon to copy your client token.




Using Your Client Token

Step 1

Pass in your Client Token wherever our API calls for a token. phz.io will differentiate based on your Client Token and allow your request to be made within your allowed permissions.

Request Body

GET User Details
GET 
https://phz.io/client/user/{{username}}?token={{client_token}} 

 Response Body

GET Response
{
  "result": {
    "favorites": {
      "lists": [
        "f0942170-8044-11e6-bac7-d5abe616f7c8",
        "e9e10060-8043-11e6-8119-bd05017b4677",
        "0b831b70-8041-11e6-8119-bd05017b4677",
        "f0c35c80-89c0-11e6-87e9-9faf2185c9d4",
        "f0c35c80-89c0-11e6-87e9-9faf2185c9d4"
      ]
    },
    "token": "953f5550-b655-11e6-9ec8-b3f9139245c3",
    "timezone": "America/Denver",
    "active": "true",
    "username": "lreese",
    "createddate": "2014-12-19T21:28:58.758Z",
    "client_id": "388e16d6-d35e-4f8c-bba5-b1147b824473",
    "email": "lreese@phizzle.com",
    "defaults": {
      "facebook_profile": null,
      "twitter_profile": null,
      "undefined_profile": "Test today ryry",
      "sendgrid_subuser_account_profile": null
    },
    "last_login": "2016-11-29T:05:11:16Z",
    "createdby_id": "superuser",
    "cookie_timestamp": "2016-04-08T18:18:53.277Z",
    "permission_id": "27025bbb-0b0e-4e14-ab1b-22297ac06161",
    "cookie_id": "71b37e8e-171d-4651-bf53-7643fdf20088",
    "tokentimestamp": "2016-10-26T23:20:37.308Z",
    "lists": [
      "f0942170-8044-11e6-bac7-d5abe616f7c8"
    ],
    "lastmodifieddate": "2016-11-29T17:02:17Z",
    "lastmodifiedby_id": "lreese",
    "permission": "Super Admin",
    "name": "Louisa Reese",
    "type": "user"
  },
  "error": null,
  "next_key": null,
  "status": 200
}










  • No labels