Create a new OAuth2 client
curl --request POST \
--url https://api.flexslot.gg/api/public/v1/me/partner/oauth2-clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"application_name": "<string>",
"redirect_uris": [
"<string>"
],
"allowed_scopes": [],
"client_type": "confidential",
"grant_types": [
"authorization_code",
"refresh_token"
],
"application_url": "",
"application_logo_url": "",
"privacy_policy_url": "",
"tos_url": ""
}
'import requests
url = "https://api.flexslot.gg/api/public/v1/me/partner/oauth2-clients"
payload = {
"application_name": "<string>",
"redirect_uris": ["<string>"],
"allowed_scopes": [],
"client_type": "confidential",
"grant_types": ["authorization_code", "refresh_token"],
"application_url": "",
"application_logo_url": "",
"privacy_policy_url": "",
"tos_url": ""
}
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({
application_name: '<string>',
redirect_uris: ['<string>'],
allowed_scopes: [],
client_type: 'confidential',
grant_types: ['authorization_code', 'refresh_token'],
application_url: '',
application_logo_url: '',
privacy_policy_url: '',
tos_url: ''
})
};
fetch('https://api.flexslot.gg/api/public/v1/me/partner/oauth2-clients', 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.flexslot.gg/api/public/v1/me/partner/oauth2-clients",
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([
'application_name' => '<string>',
'redirect_uris' => [
'<string>'
],
'allowed_scopes' => [
],
'client_type' => 'confidential',
'grant_types' => [
'authorization_code',
'refresh_token'
],
'application_url' => '',
'application_logo_url' => '',
'privacy_policy_url' => '',
'tos_url' => ''
]),
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.flexslot.gg/api/public/v1/me/partner/oauth2-clients"
payload := strings.NewReader("{\n \"application_name\": \"<string>\",\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"allowed_scopes\": [],\n \"client_type\": \"confidential\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"application_url\": \"\",\n \"application_logo_url\": \"\",\n \"privacy_policy_url\": \"\",\n \"tos_url\": \"\"\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.flexslot.gg/api/public/v1/me/partner/oauth2-clients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"application_name\": \"<string>\",\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"allowed_scopes\": [],\n \"client_type\": \"confidential\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"application_url\": \"\",\n \"application_logo_url\": \"\",\n \"privacy_policy_url\": \"\",\n \"tos_url\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexslot.gg/api/public/v1/me/partner/oauth2-clients")
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 \"application_name\": \"<string>\",\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"allowed_scopes\": [],\n \"client_type\": \"confidential\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"application_url\": \"\",\n \"application_logo_url\": \"\",\n \"privacy_policy_url\": \"\",\n \"tos_url\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"client": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"client_id": "<string>",
"client_type": "confidential",
"application_name": "<string>",
"application_url": "<string>",
"application_logo_url": "<string>",
"privacy_policy_url": "<string>",
"tos_url": "<string>",
"redirect_uris": [
"<string>"
],
"allowed_scopes": [
"<string>"
],
"grant_types": [
"<string>"
],
"require_pkce": true,
"dpop_bound_access_tokens": true,
"status": "active",
"secret_rotated_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"plaintext_client_secret": "<string>",
"secret_rotated_at": "2023-11-07T05:31:56Z"
}Me
Create a new OAuth2 client
Creates an OAuth2 client for the PAT user’s partner. Confidential clients receive a plaintext secret in the response exactly ONCE; public clients receive an empty secret (PKCE only). Subject to a per-partner client limit.
POST
/
api
/
public
/
v1
/
me
/
partner
/
oauth2-clients
Create a new OAuth2 client
curl --request POST \
--url https://api.flexslot.gg/api/public/v1/me/partner/oauth2-clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"application_name": "<string>",
"redirect_uris": [
"<string>"
],
"allowed_scopes": [],
"client_type": "confidential",
"grant_types": [
"authorization_code",
"refresh_token"
],
"application_url": "",
"application_logo_url": "",
"privacy_policy_url": "",
"tos_url": ""
}
'import requests
url = "https://api.flexslot.gg/api/public/v1/me/partner/oauth2-clients"
payload = {
"application_name": "<string>",
"redirect_uris": ["<string>"],
"allowed_scopes": [],
"client_type": "confidential",
"grant_types": ["authorization_code", "refresh_token"],
"application_url": "",
"application_logo_url": "",
"privacy_policy_url": "",
"tos_url": ""
}
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({
application_name: '<string>',
redirect_uris: ['<string>'],
allowed_scopes: [],
client_type: 'confidential',
grant_types: ['authorization_code', 'refresh_token'],
application_url: '',
application_logo_url: '',
privacy_policy_url: '',
tos_url: ''
})
};
fetch('https://api.flexslot.gg/api/public/v1/me/partner/oauth2-clients', 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.flexslot.gg/api/public/v1/me/partner/oauth2-clients",
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([
'application_name' => '<string>',
'redirect_uris' => [
'<string>'
],
'allowed_scopes' => [
],
'client_type' => 'confidential',
'grant_types' => [
'authorization_code',
'refresh_token'
],
'application_url' => '',
'application_logo_url' => '',
'privacy_policy_url' => '',
'tos_url' => ''
]),
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.flexslot.gg/api/public/v1/me/partner/oauth2-clients"
payload := strings.NewReader("{\n \"application_name\": \"<string>\",\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"allowed_scopes\": [],\n \"client_type\": \"confidential\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"application_url\": \"\",\n \"application_logo_url\": \"\",\n \"privacy_policy_url\": \"\",\n \"tos_url\": \"\"\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.flexslot.gg/api/public/v1/me/partner/oauth2-clients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"application_name\": \"<string>\",\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"allowed_scopes\": [],\n \"client_type\": \"confidential\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"application_url\": \"\",\n \"application_logo_url\": \"\",\n \"privacy_policy_url\": \"\",\n \"tos_url\": \"\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexslot.gg/api/public/v1/me/partner/oauth2-clients")
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 \"application_name\": \"<string>\",\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"allowed_scopes\": [],\n \"client_type\": \"confidential\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"application_url\": \"\",\n \"application_logo_url\": \"\",\n \"privacy_policy_url\": \"\",\n \"tos_url\": \"\"\n}"
response = http.request(request)
puts response.read_body{
"client": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"client_id": "<string>",
"client_type": "confidential",
"application_name": "<string>",
"application_url": "<string>",
"application_logo_url": "<string>",
"privacy_policy_url": "<string>",
"tos_url": "<string>",
"redirect_uris": [
"<string>"
],
"allowed_scopes": [
"<string>"
],
"grant_types": [
"<string>"
],
"require_pkce": true,
"dpop_bound_access_tokens": true,
"status": "active",
"secret_rotated_at": "2023-11-07T05:31:56Z",
"last_used_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"plaintext_client_secret": "<string>",
"secret_rotated_at": "2023-11-07T05:31:56Z"
}Authorizations
PersonalAccessTokenOAuth2Bearer
User-issued personal access token (format: flx_pat_).
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Required string length:
1 - 255Required string length:
1 - 512cards:read- cards:readdecks:read- decks:readdecks:write- decks:writeexports:read- exports:readguides:read- guides:readguides:write- guides:writesideboards:read- sideboards:readsideboards:write- sideboards:write
Available options:
cards:read, decks:read, decks:write, exports:read, guides:read, guides:write, sideboards:read, sideboards:write confidential- confidentialpublic- public
Available options:
confidential, public authorization_code- authorization_coderefresh_token- refresh_token
Available options:
authorization_code, refresh_token Maximum string length:
512Maximum string length:
512Maximum string length:
512Maximum string length:
512Was this page helpful?