REST APIs
...
Authentication
Create new access
code examples curl location 'https //api detected app/api/v2/public/oauth/token' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "grant type" "opt email", "client id" "9e97129d 9d62 4771 85d9 0e00f71234dc", "client secret" "09102ijnajksdbaiiabisa", "slug" "account123" }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "grant type" "opt email", "client id" "9e97129d 9d62 4771 85d9 0e00f71234dc", "client secret" "09102ijnajksdbaiiabisa", "slug" "account123" }); var requestoptions = { method 'post', headers myheaders, body raw, redirect 'follow' }; fetch("https //api detected app/api/v2/public/oauth/token", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //api detected app/api/v2/public/oauth/token") https = net http new(url host, url port) https use ssl = true request = net http post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "grant type" "opt email", "client id" "9e97129d 9d62 4771 85d9 0e00f71234dc", "client secret" "09102ijnajksdbaiiabisa", "slug" "account123" }) response = https request(request) puts response read body import requests import json url = "https //api detected app/api/v2/public/oauth/token" payload = json dumps({ "grant type" "opt email", "client id" "9e97129d 9d62 4771 85d9 0e00f71234dc", "client secret" "09102ijnajksdbaiiabisa", "slug" "account123" }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // ok { "data" { "token type" "bearer", "expires in" 360, "access token" "", "refresh token" "" } }// bad request { "message" "bad request" }// unauthorized { "message" "unauthorized " }// too many requests { "message" "too many attempts " }