Get access to your authenticated user

How to fetch data from your authenticated user

  • Fetch the authenticated user 

Sandbox endpoint

https://api.platform.sandbox.easytranslate.com/api/v1/user

In order to fetch your authenticated user, you need to send a GET request. 

 

In your request's header, you first need to add your access token, to do so, simply add "Authorization" as a key and "Bearer {{ACCESS_TOKEN}}" (instead of {{ACCESS_TOKEN}}, you should provide your access token), you then need to specify that json should be accepted. To do so, add "Accept" as a key and "application/json" as its value. 

 

Request example (Sandbox)

curl --location --request GET 'https://api.platform.sandbox.easytranslate.com/api/v1/user' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{ACCESS_TOKEN}}'

 

Response example 

This is the data you would receive as a response:

{
"data": {
"id": "{{CUSTOMER_ID}}",
"type": "customer",
"attributes": {
"email": "customer@test.test",
"email_verified_at": "2019-12-17T11:50:42.000000Z",
"created_at": "2019-12-17T11:50:42.000000Z",
"updated_at": "2019-12-17T11:50:42.000000Z"
},
"relationships": {
"accounts": [
{
"id": "{{CUSTOMER_ACCOUNT_ID}}",
"type": "account"
}
]
}
},
"included": [
{
"type": "account",
"id": "{{CUSTOMER_ACCOUNT_ID}}",
"attributes": {
"company_name": "Acme Inc.",
"company_email": "user@acme.com",
"team_identifier": "acme-inc",
"is_parent": true,
"invoice_language": "en",
"receipt_email": "acme-inc",
"vat_number": null,
"created_at": "2020-04-27T12:04:22.000000Z",
"updated_at": "2020-05-04T07:01:15.000000Z"
}
}
]
}