Using "~" to expand known variables.

Often times, when using an API with lower scopes permissions, such as Basic User or Office Manager, you will need to use API paths that include the domain and username. However, if you are a developer, you can now code around this requirement by using the ~ wildcard character. This is only supported for API keys that are linked to a specific user and domain. API keys with scopes like Reseller and Super User do not support the ~ wildcard character because they do not have a domain or username associated with them. However, you can still use the ~ wildcard character for access tokens with higher scopes, as these tokens are always created with a specific user and domain.

If you do attempt to use ~ when its not available you will see an error like below.

Error shown as a example trying to use ~ with a super user scoped apikey

Error shown as a example trying to use ~ with a super user scoped apikey

Currently Supported Fields

  • User
  • Domain
  • Reseller
  • Agent
    • Will replace ~ with user@domain format for use in call center when using user based dispatch.
  • APIkey
    • Used when reading own token.