curl --request POST \
--url https://api.invopop.com/access/v1/enrollment/authorize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "XzhLPeXCi3GBVg",
"client_secret": "p2NWtVpuDxDYt41crWUBmQKaE4Mh92roDxp_8UKkIJY",
"id": "01950020-daef-7d75-b1ba-33e7e392a658",
"owner_id": "347c5b04-cde2-11ed-afa1-0242ac120002"
}
'import requests
url = "https://api.invopop.com/access/v1/enrollment/authorize"
payload = {
"client_id": "XzhLPeXCi3GBVg",
"client_secret": "p2NWtVpuDxDYt41crWUBmQKaE4Mh92roDxp_8UKkIJY",
"id": "01950020-daef-7d75-b1ba-33e7e392a658",
"owner_id": "347c5b04-cde2-11ed-afa1-0242ac120002"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
client_id: 'XzhLPeXCi3GBVg',
client_secret: 'p2NWtVpuDxDYt41crWUBmQKaE4Mh92roDxp_8UKkIJY',
id: '01950020-daef-7d75-b1ba-33e7e392a658',
owner_id: '347c5b04-cde2-11ed-afa1-0242ac120002'
})
};
fetch('https://api.invopop.com/access/v1/enrollment/authorize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.invopop.com/access/v1/enrollment/authorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_id' => 'XzhLPeXCi3GBVg',
'client_secret' => 'p2NWtVpuDxDYt41crWUBmQKaE4Mh92roDxp_8UKkIJY',
'id' => '01950020-daef-7d75-b1ba-33e7e392a658',
'owner_id' => '347c5b04-cde2-11ed-afa1-0242ac120002'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.invopop.com/access/v1/enrollment/authorize"
payload := strings.NewReader("{\n \"client_id\": \"XzhLPeXCi3GBVg\",\n \"client_secret\": \"p2NWtVpuDxDYt41crWUBmQKaE4Mh92roDxp_8UKkIJY\",\n \"id\": \"01950020-daef-7d75-b1ba-33e7e392a658\",\n \"owner_id\": \"347c5b04-cde2-11ed-afa1-0242ac120002\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.invopop.com/access/v1/enrollment/authorize")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_id\": \"XzhLPeXCi3GBVg\",\n \"client_secret\": \"p2NWtVpuDxDYt41crWUBmQKaE4Mh92roDxp_8UKkIJY\",\n \"id\": \"01950020-daef-7d75-b1ba-33e7e392a658\",\n \"owner_id\": \"347c5b04-cde2-11ed-afa1-0242ac120002\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.invopop.com/access/v1/enrollment/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_id\": \"XzhLPeXCi3GBVg\",\n \"client_secret\": \"p2NWtVpuDxDYt41crWUBmQKaE4Mh92roDxp_8UKkIJY\",\n \"id\": \"01950020-daef-7d75-b1ba-33e7e392a658\",\n \"owner_id\": \"347c5b04-cde2-11ed-afa1-0242ac120002\"\n}"
response = http.request(request)
puts response.read_body{
"app_id": "01900e17-db4d-78a5-8505-c93ae63e8a0d",
"created_at": "2018-01-01T00:00:00.000Z",
"data": {
"key": "value"
},
"disabled": false,
"id": "01950020-daef-7d75-b1ba-33e7e392a658",
"owner_id": "347c5b04-cde2-11ed-afa1-0242ac120002",
"sandbox": false,
"token": "<string>",
"token_expires": 1680000000,
"updated_at": "2018-01-01T00:00:00.000Z"
}Authorize enrollment
Authenticate using application credentials and a specific owner ID, token, or enrollment. (Only Applications!)
curl --request POST \
--url https://api.invopop.com/access/v1/enrollment/authorize \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"client_id": "XzhLPeXCi3GBVg",
"client_secret": "p2NWtVpuDxDYt41crWUBmQKaE4Mh92roDxp_8UKkIJY",
"id": "01950020-daef-7d75-b1ba-33e7e392a658",
"owner_id": "347c5b04-cde2-11ed-afa1-0242ac120002"
}
'import requests
url = "https://api.invopop.com/access/v1/enrollment/authorize"
payload = {
"client_id": "XzhLPeXCi3GBVg",
"client_secret": "p2NWtVpuDxDYt41crWUBmQKaE4Mh92roDxp_8UKkIJY",
"id": "01950020-daef-7d75-b1ba-33e7e392a658",
"owner_id": "347c5b04-cde2-11ed-afa1-0242ac120002"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
client_id: 'XzhLPeXCi3GBVg',
client_secret: 'p2NWtVpuDxDYt41crWUBmQKaE4Mh92roDxp_8UKkIJY',
id: '01950020-daef-7d75-b1ba-33e7e392a658',
owner_id: '347c5b04-cde2-11ed-afa1-0242ac120002'
})
};
fetch('https://api.invopop.com/access/v1/enrollment/authorize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.invopop.com/access/v1/enrollment/authorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'client_id' => 'XzhLPeXCi3GBVg',
'client_secret' => 'p2NWtVpuDxDYt41crWUBmQKaE4Mh92roDxp_8UKkIJY',
'id' => '01950020-daef-7d75-b1ba-33e7e392a658',
'owner_id' => '347c5b04-cde2-11ed-afa1-0242ac120002'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.invopop.com/access/v1/enrollment/authorize"
payload := strings.NewReader("{\n \"client_id\": \"XzhLPeXCi3GBVg\",\n \"client_secret\": \"p2NWtVpuDxDYt41crWUBmQKaE4Mh92roDxp_8UKkIJY\",\n \"id\": \"01950020-daef-7d75-b1ba-33e7e392a658\",\n \"owner_id\": \"347c5b04-cde2-11ed-afa1-0242ac120002\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.invopop.com/access/v1/enrollment/authorize")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"client_id\": \"XzhLPeXCi3GBVg\",\n \"client_secret\": \"p2NWtVpuDxDYt41crWUBmQKaE4Mh92roDxp_8UKkIJY\",\n \"id\": \"01950020-daef-7d75-b1ba-33e7e392a658\",\n \"owner_id\": \"347c5b04-cde2-11ed-afa1-0242ac120002\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.invopop.com/access/v1/enrollment/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_id\": \"XzhLPeXCi3GBVg\",\n \"client_secret\": \"p2NWtVpuDxDYt41crWUBmQKaE4Mh92roDxp_8UKkIJY\",\n \"id\": \"01950020-daef-7d75-b1ba-33e7e392a658\",\n \"owner_id\": \"347c5b04-cde2-11ed-afa1-0242ac120002\"\n}"
response = http.request(request)
puts response.read_body{
"app_id": "01900e17-db4d-78a5-8505-c93ae63e8a0d",
"created_at": "2018-01-01T00:00:00.000Z",
"data": {
"key": "value"
},
"disabled": false,
"id": "01950020-daef-7d75-b1ba-33e7e392a658",
"owner_id": "347c5b04-cde2-11ed-afa1-0242ac120002",
"sandbox": false,
"token": "<string>",
"token_expires": 1680000000,
"updated_at": "2018-01-01T00:00:00.000Z"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The ID of the application that is being enrolled.
"XzhLPeXCi3GBVg"
The secret key of the application that is being enrolled.
"p2NWtVpuDxDYt41crWUBmQKaE4Mh92roDxp_8UKkIJY"
The ID of the enrollment to authorize to use as an alternative to the owner ID.
"01950020-daef-7d75-b1ba-33e7e392a658"
The ID of the entity that owns the enrollment. It is essential this is provided from a trusted source or an auth token is provided in the headers.
"347c5b04-cde2-11ed-afa1-0242ac120002"
Response
OK
ID of the application associated with the enrollment.
"01900e17-db4d-78a5-8505-c93ae63e8a0d"
The date and time the enrollment was created.
"2018-01-01T00:00:00.000Z"
Additional data associated with the enrollment.
{ "key": "value" }
Whether the enrollment is disabled.
false
UUID of the enrollment.
"01950020-daef-7d75-b1ba-33e7e392a658"
The ID of the entity that owns the enrollment.
"347c5b04-cde2-11ed-afa1-0242ac120002"
Indicates if the enrollment's workspace is in a sandbox environment.
false
A token that may be used to authenticate the enrollment with API operations.
The expiration unix timestamp of the token.
1680000000
The date and time the enrollment was last updated.
"2018-01-01T00:00:00.000Z"
Was this page helpful?