Generate Access Token — OAuth Client Credentials
Generate an access token using client_id and client_secret. Authenticate all Deepvue API requests with OAuth 2.0 client credentials flow.
curl -X POST "https://production.deepvue.tech/v1/authorize" \
-H "X-Deepvue-Origin: acme-web" \
--form client_id=YOUR_CLIENT_ID \
--form client_secret=YOUR_CLIENT_SECRET
import requests
import json
url = "https://production.deepvue.tech/v1/authorize"
headers = {
"X-Deepvue-Origin": "acme-web"
}
data = {
"client_id": "YOUR_CLIENT_ID",
"client_secret": "YOUR_CLIENT_SECRET"
}
response = requests.post(url, headers=headers, data=data)
print(response.json())
const formData = new FormData();
formData.append("client_id", "YOUR_CLIENT_ID");
formData.append("client_secret", "YOUR_CLIENT_SECRET");
const response = await fetch("https://production.deepvue.tech/v1/authorize", {
method: "POST",
headers: {
"X-Deepvue-Origin": "acme-web"
},
body: formData
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"mime/multipart"
)
func main() {
body := &bytes.Buffer{}
writer := multipart.NewWriter(body)
writer.WriteField("client_id", "YOUR_CLIENT_ID")
writer.WriteField("client_secret", "YOUR_CLIENT_SECRET")
writer.Close()
req, err := http.NewRequest("POST", "https://production.deepvue.tech/v1/authorize", body)
if err != nil {
panic(err)
}
req.Header.Set("X-Deepvue-Origin", "acme-web")
req.Header.Set("Content-Type", writer.FormDataContentType())
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://production.deepvue.tech/v1/authorize')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['X-Deepvue-Origin'] = 'acme-web'
request.set_form([
["client_id", "YOUR_CLIENT_ID"],
["client_secret", "YOUR_CLIENT_SECRET"]
], 'multipart/form-data')
response = http.request(request)
puts response.body
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example_access_token",
"token_type": "bearer",
"expiry": "2025-04-30T23:59:59Z"
}
{
"detail": "Incorrect client_id or client_secret"
}
{
"detail": "Access forbidden"
}
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
{
"detail": "Internal Server Error"
}
/v1/authorize
Target server for requests. Edit to use your own host.
The media type of the request body
Identifies the product, service, or platform you are calling the API from. The value appears in the Caller column of Transaction logs and in dashboard analytics.
- Use lowercase letters, digits, and hyphens only
- Start with a letter or digit
- Maximum 32 characters
A value that does not match ^[a-z0-9][a-z0-9-]{0,31}$ is rejected with INVALID_ORIGIN_METADATA.
CLIENT_ID provided to you
CLIENT_SECRET provided to you
Request Preview
Response
Response will appear here after sending the request
Headers
Identifies the product, service, or platform you are calling the API from. The value appears in the Caller column of Transaction logs and in dashboard analytics.
- Use lowercase letters, digits, and hyphens only
- Start with a letter or digit
- Maximum 32 characters
A value that does not match ^[a-z0-9][a-z0-9-]{0,31}$ is rejected with INVALID_ORIGIN_METADATA.
acme-webBody
CLIENT_ID provided to you
CLIENT_SECRET provided to you