API
GuidesGet API token
You’re viewing the reference for API version 2021-01.See the latest version, 2021-11 →
Admin Resources

Token information

This resource allows a caller to inspect basic information regarding the token in use. It will only return a single object related to the calling token ( ie - a call with api_token.id=1 will only return information regarding api_token.id=1.

#The Token information object

Object containing a token's information.

Attributes

  • clientobject
    Details of the client which generated the token.
    If the API token was generated by an OAuth app, the object will contain associated client information.
    If the API token was generated by the merchant, the object will reflect the name prefaced by '[Private App]' and contact_email of the token.
    Show child attributesHide child attributes2
    • namestring
      The client's name.
    • emailstring
      The client's email.
  • The email associated with the API Token record.
    For tokens created via OAuth App the contact can be null
  • namestring
    The name of the API Token as created by merchant.
  • scopesarray
    A list of scopes on the API Token.
The Token information object
{
  "client": {
    "name": "PARTNER",
    "contact_email": "ed@partner.com"
  },
  "contact_email": "jbluhm@example.com",
  "name": "token name",
  "scopes": [
    "read_store",
    "write_payment_methods"
  ]
}

#Retrieve token information

GET/token_information
Retrieve token details.
GET/token_information
curl 'https://api.rechargeapps.com/token_information' \
  -H 'X-Recharge-Access-Token: your_api_token'
Response
{
  "token_information": {
    "name": "token name",
    "client": {
      "name": "PARTNER",
      "contact_email": "ed@partner.com"
    },
    "contact_email": "jbluhm@example.com",
    "scopes": [
      "read_shop",
      "write_payments"
    ]
  }
}