Get current user profile
const options = {method: 'GET'};
fetch('http://localhost:8000/api/v1/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/api/v1/me"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request GET \
--url http://localhost:8000/api/v1/meimport requests
url = "http://localhost:8000/api/v1/me"
response = requests.get(url)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"email": "jsmith@example.com",
"name": "<string>",
"image": "<string>",
"emailVerified": true,
"createdAt": "<string>",
"role": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}Profile
Get current user profile
Returns the authenticated user profile information
GET
/
api
/
v1
/
me
Get current user profile
const options = {method: 'GET'};
fetch('http://localhost:8000/api/v1/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/api/v1/me"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request GET \
--url http://localhost:8000/api/v1/meimport requests
url = "http://localhost:8000/api/v1/me"
response = requests.get(url)
print(response.text){
"success": true,
"data": {
"id": "<string>",
"email": "jsmith@example.com",
"name": "<string>",
"image": "<string>",
"emailVerified": true,
"createdAt": "<string>",
"role": "<string>"
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}Was this page helpful?