Enterprise Application Interfa...
...
Authentication
Obtain an OAuth2 access token
1 min
code examples curl location globoff 'https //{subdomain} teleskope io/eai/oauth2/token php' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ form 'scope=""'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var formdata = new formdata(); formdata append("scope", ""); var requestoptions = { method 'post', headers myheaders, body formdata, redirect 'follow' }; fetch("https //{subdomain} teleskope io/eai/oauth2/token php", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));import requests import json url = "https //{subdomain} teleskope io/eai/oauth2/token php" payload = {} files=\[ ] headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload, files=files) print(response text) \<?php $curl = curl init(); curl setopt array($curl, array( curlopt url => 'https //{subdomain} teleskope io/eai/oauth2/token php', curlopt returntransfer => true, curlopt encoding => '', curlopt maxredirs => 10, curlopt timeout => 0, curlopt followlocation => true, curlopt http version => curl http version 1 1, curlopt customrequest => 'post', curlopt postfields => array(), curlopt httpheader => array( 'accept application/json', 'content type application/json' ), )); $response = curl exec($curl); curl close($curl); echo $response; responses // token issued successfully { "access token" "", "token type" "", "expires in" 86400, "scope" "" }// missing or invalid scope { "error" "invalid client", "error description" "invalid client credentials or inactive account" }// invalid client credentials { "error" "invalid client", "error description" "invalid client credentials or inactive account" }// maximum active tokens reached { "error" "invalid client", "error description" "invalid client credentials or inactive account" }
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.