Skip to content

Reference AccessToken

Benedikt Schulze Baek edited this page Feb 13, 2017 · 11 revisions

Create PageAccessToken

This method will create a PageAccessToken.

POST https://api.chayns.net/v2.0/{LocationID}/AccessToken

Header
Authorization: Basic {TappID}:{Secret}

The part 'TappID:Secret' has to be Base64 encoded.

Parameter

  • LocationID : int - Can be found in chayns.env.site.
  • TappID : int - Can be found in chayns.env.site.
  • Secret : string - Your tapp secret.
  • Permissions : string[] - An array containing the permissions you want to get. It has to be set in the request body.

Result

  • PageAccessToken : string - The pageAccessToken for the current location and tapp.

Read AccessToken

This method will return information about a PageAccessToken or a UserAccessToken.

GET https://api.chayns.net/v2.0/{LocationID}/AccessToken

Header
Authorization: Bearer {AccessToken}

Provide the PageAccessToken or TobitAccessToken you want to read.

Parameter

  • LocationID : int - Can be found in chayns.env.site.
  • AccessToken : string - The accessToken you want to read. It can be either a pageAccessToken or a tobitAccessToken.

Result (PageAccessToken)

  • developerId : int -
  • tappId: int -
  • locationId : int -
  • expires : Date -
  • tokenType.type : int -
  • tokenType.name : string -
  • permissions : string[] -

Result (UserAccessToken)

  • locationId : int -
  • userId : int -
  • personId : string
  • facebookUserId : string -
  • firstName : string -
  • lastName : string -
  • expires : Date -
  • tokenType.type : int -
  • tokenType.name : string -
Clone this wiki locally