> ## Documentation Index
> Fetch the complete documentation index at: https://memoram.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

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

Requires `Bearer` token authentication using your Developer JWT.


## OpenAPI

````yaml GET /access-requests/{requestId}/credentials
openapi: 3.0.3
info:
  title: Memoram API v1
  description: >-
    API for interacting with the Memoram platform, managing access, memories,
    and tags.
  version: 1.0.0
  contact:
    name: Memoram Support
    url: https://memoram.app
    email: support@memoram.app
servers:
  - url: https://api.memoram.app/api/v1
    description: Production Server
security: []
tags:
  - name: Access Management
    description: >-
      Endpoints for obtaining authentication tokens and managing access requests
      to user memories.
  - name: Memory Management
    description: >-
      Endpoints for creating, retrieving, updating, and deleting user memory
      blobs.
  - name: Memory Tag Management
    description: Endpoints for retrieving memory tags.
paths:
  /access-requests/{requestId}/credentials:
    get:
      tags:
        - Access Management
      summary: Get User Encryption Key
      description: >-
        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.
      parameters:
        - name: requestId
          in: path
          required: true
          description: The unique ID of an APPROVED access request.
          schema:
            type: string
      responses:
        '200':
          description: Successfully retrieved user credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessCredentialsResponse'
        '401':
          description: Unauthorized - Invalid or expired JWT.
        '403':
          description: >-
            Forbidden - Access request is not approved or does not belong to the
            authenticated developer.
        '404':
          description: Not Found - Access request with the specified ID not found.
      security:
        - bearerAuth: []
components:
  schemas:
    AccessCredentialsResponse:
      type: object
      properties:
        user_id:
          type: string
          format: uuid
          description: The unique ID of the user.
        memory_key:
          type: string
          description: The user's Memory Key (same as provided in the initial request).
        encryption_key:
          type: string
          description: >-
            The hexadecimal string representation of the user's symmetric
            encryption key. Use this to encrypt/decrypt memory content.
        key_version:
          type: integer
          description: The version of the encryption key.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token obtained via `/auth/token` endpoint.

````