Get User Encryption Key
curl --request GET \
--url https://api.memoram.app/api/v1/access-requests/{requestId}/credentials \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.memoram.app/api/v1/access-requests/{requestId}/credentials"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.memoram.app/api/v1/access-requests/{requestId}/credentials', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.memoram.app/api/v1/access-requests/{requestId}/credentials",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.memoram.app/api/v1/access-requests/{requestId}/credentials"
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))
}HttpResponse<String> response = Unirest.get("https://api.memoram.app/api/v1/access-requests/{requestId}/credentials")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memoram.app/api/v1/access-requests/{requestId}/credentials")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"memory_key": "<string>",
"encryption_key": "<string>",
"key_version": 123
}Access Management
Get User Encryption Key
Retrieve the user’s Memory Key and the necessary Encryption Key for accessing their memory blobs. This endpoint ONLY works for access requests with an ‘approved’ status.
GET
/
access-requests
/
{requestId}
/
credentials
Get User Encryption Key
curl --request GET \
--url https://api.memoram.app/api/v1/access-requests/{requestId}/credentials \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.memoram.app/api/v1/access-requests/{requestId}/credentials"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.memoram.app/api/v1/access-requests/{requestId}/credentials', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.memoram.app/api/v1/access-requests/{requestId}/credentials",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.memoram.app/api/v1/access-requests/{requestId}/credentials"
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))
}HttpResponse<String> response = Unirest.get("https://api.memoram.app/api/v1/access-requests/{requestId}/credentials")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.memoram.app/api/v1/access-requests/{requestId}/credentials")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"memory_key": "<string>",
"encryption_key": "<string>",
"key_version": 123
}Retrieve the user’s Memory Key and the necessary symmetric Encryption Key required to encrypt/decrypt their memory blob content.
Important: This endpoint ONLY works for access requests that have an
approved status. Calling this for requests with other statuses (pending, rejected, revoked) will result in a 403 Forbidden error.
Authorization
RequiresBearer token authentication using your Developer JWT.Authorizations
JWT token obtained via /auth/token endpoint.
Path Parameters
The unique ID of an APPROVED access request.
Response
Successfully retrieved user credentials.
The unique ID of the user.
The user's Memory Key (same as provided in the initial request).
The hexadecimal string representation of the user's symmetric encryption key. Use this to encrypt/decrypt memory content.
The version of the encryption key.