PRO: oAuth Example – getToken

This page shows the oAuth-Token requested from

The request on this URL must be like this:

  • method: CURL-POST
  • curloptions: Here, we define the login user/password to get the token.
CURLOPT_POSTFIELDS={"user":"test", "password":"mypass"}
  • Twig-template (you might try {{ _context | json_encode }} to see the full API answer:
{{ _context.access_token }}

If the API does not answer with HTTP code 200 (this does answer with 405) add “httpstatuscodemustbe200=no” to the shortcode

[jsoncontentimporterpro nameoftemplate="gettoken" httpstatuscodemustbe200=no orderofshortcodeeval=10]

This gives us the token (the token is md5(“mypass”) – in real life, this is not that easy):


The complete API response is ({{ _context | json_encode }}):


In action: