Get User - GET
To retrieve a user, you need to make a GET
request to the endpoint
GET https://api.palenca.com/v1/users/:user_id
Here are some examples in different languages:
- JavaScript
- Python
- curl
const axios = require('axios')
const config = {
method: 'GET',
url: 'https://api.palenca.com/v1/users/:user_id',
headers: {
'x-api-key': 'private_api_key',
'Content-Type': 'application/json'
},
};
(async () => {
try {
const {data} = await axios(config)
console.info(JSON.stringify(response.data))
} catch (error) {
console.error(error)
}
})()
import requests
url = 'https://api.palenca.com/v1/users/:user_id'
headers = {
'x-api-key': 'private_api_key',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
curl --location --request GET 'https://api.palenca.com/v1/users/:user_id' \
--header 'x-api-key: private_api_key' \
--header 'Content-Type: application/json'
Returns a JSON structured like this:
{
"success": true,
"error": null,
"data": {
"user_id": "9334389a-c93c-4183-9894-ea8eb72f82e8",
"external_id": "e69bdbc2-495c-4356-be5f-13c55644a80b",
"widget_id": "feecb679-a3cc-47ef-8fd4-600799f12a39"
}
}
Query params
Parameter | Description | Type | Required | Example |
---|---|---|---|---|
user_id | user_id from Palenca | string | True | driver_12345 |
Note
If one of your users connected different rideshare or delivery accounts with Palenca, you will need to make a separate API request for each of them.