Obter usuario autenticado
curl --request GET \
--url http://localhost:4000/v1/auth/me \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:4000/v1/auth/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:4000/v1/auth/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:4000/v1/auth/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"user": {
"id": "<string>",
"displayName": "<string>",
"email": "jsmith@example.com",
"username": "<string>",
"avatarUrl": "<string>"
},
"identities": [
{
"id": "<string>",
"provider": "<string>",
"providerUserId": "<string>",
"email": "jsmith@example.com",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"workspaces": [
{
"id": "ws_123",
"slug": "refy-labs",
"name": "Refy Labs",
"plan": "starter",
"status": "active"
}
]
}Obter usuario autenticado
GET
/
v1
/
auth
/
me
Obter usuario autenticado
curl --request GET \
--url http://localhost:4000/v1/auth/me \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('http://localhost:4000/v1/auth/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:4000/v1/auth/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:4000/v1/auth/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"user": {
"id": "<string>",
"displayName": "<string>",
"email": "jsmith@example.com",
"username": "<string>",
"avatarUrl": "<string>"
},
"identities": [
{
"id": "<string>",
"provider": "<string>",
"providerUserId": "<string>",
"email": "jsmith@example.com",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"workspaces": [
{
"id": "ws_123",
"slug": "refy-labs",
"name": "Refy Labs",
"plan": "starter",
"status": "active"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
200 - application/json
Contexto do usuario autenticado