Security
Authentication
To access the API provided, you will need to create a JSON Web Token (JWT) using the key and secret key provided. Please ensure that you store these credentials securely.
HTTP Request [POST]
https://parceiros.empregos.com.br/oauth/v2/accessToken
- cURL
- C#
- JavaScript
- Python
curl -X 'POST' \
'https://parceiros.empregos.com.br/oauth/v2/accessToken' \
-H 'accept: */*' \
-H 'Authorization: bearer any' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'ClientSecret{{ClienteSecret}}=&ClientId={{ClientId}}'
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
private const string AccessTokenUrl = "https://parceiros.empregos.com.br/oauth/v2/accessToken";
static async Task Main(string[] args)
{
await GetAccessToken();
}
static async Task GetAccessToken()
{
using (HttpClient httpClient = new HttpClient())
{
httpClient.DefaultRequestHeaders.Accept.Clear();
httpClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("*/*"));
httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("bearer", "any");
var formData = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("ClientSecret", "{{ClienteSecret}}"),
new KeyValuePair<string, string>("ClientId", "{{ClientId}}")
});
var response = await httpClient.PostAsync(AccessTokenUrl, formData);
if (response.IsSuccessStatusCode)
{
string accessToken = await response.Content.ReadAsStringAsync();
Console.WriteLine($"Access Token: {accessToken}");
}
else
{
Console.WriteLine($"Failed to get access token. Status Code: {response.StatusCode}");
}
}
}
}
const apiUrl = "https://parceiros.empregos.com.br/oauth/v2/accessToken";
const data = {
ClientSecret: "string",
ClientId: "string",
};
fetch(apiUrl, {
method: "POST",
headers: {
Accept: "_/_",
Authorization: "bearer any",
"Content-Type": "application/x-www-form-urlencoded",
},
body: JSON.stringify(data),
});
import requests
import json
url = 'https://parceiros.empregos.com.br/oauth/v2/accessToken'
headers = {
'accept': '*/*',
'Authorization': 'bearer any',
'Content-Type': 'application/x-www-form-urlencoded'
}
data = {
ClientSecret: "string",
ClientId: "string"
}
response = requests.post(url, headers=headers, data=json.dumps(data))
Transport
All endpoints must furnish a verifiable SSL certificate signed by a well-known Certificate Authority (such as those trusted by Mozilla). If your web browser can visit the endpoint without generating a security warning, we can support it.