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

# Get logged in users data

> **/auth/**

<Note>
  This endpoint requires authentication. Include your Bearer token in the Authorization header.
</Note>

## Description

**/auth/**

**Description:**\
The `/auth/` endpoint provides access to information about the currently logged-in user, including their user data and authentication details.

**Method:**\
`GET`

**Response:**\
Upon successful retrieval of the user's data, the endpoint returns the user's information in the response body.

## Code Examples

<CodeGroup>
  ```javascript Node.js theme={null}
  const response = await fetch('https://api.royalti.io/auth/', {
    method: 'GET',
    headers: {
      'Authorization': `Bearer ${token}`,
    },
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
    'https://api.royalti.io/auth/',
    headers={
      'Authorization': f'Bearer {token}'
    },
  )

  data = response.json()
  print(data)
  ```

  ```bash cURL theme={null}
  curl -X GET https://api.royalti.io/auth/ \
    -H "Authorization: Bearer YOUR_TOKEN" \

  ```
</CodeGroup>


## OpenAPI

````yaml get /auth/
openapi: 3.0.0
info:
  title: Royalti.io API
  description: "# Royalti API\r\n\r\nThis is the Royalti music royalty management platform API server.\r\n\r\n## Overview\r\n\r\nThe Royalti API provides comprehensive music royalty management services including:\r\n- Music publishing and writer management\r\n- Royalty processing and analytics\r\n- DDEX integration for music industry standards\r\n- File processing and pattern recognition\r\n- Payment processing and distribution\r\n\r\n## Authentication\r\n\r\nThe API uses JWT-based authentication with multiple protection levels:\r\n- Public endpoints for basic operations\r\n- Protected endpoints requiring valid JWT tokens\r\n- Admin endpoints for administrative functions\r\n\r\n## Features\r\n\r\n- Multi-dimensional royalty analytics\r\n- CWR (Collective Works Registration) support\r\n- DDEX integration for music metadata\r\n- Advanced file processing with pattern recognition\r\n- Real-time data processing with queue system"
  version: 2.6.0
  contact:
    name: Royalti.io Support
    email: support@royalti.io
    url: https://royalti.io
  license:
    name: Proprietary
    url: https://royalti.io/terms
servers:
  - url: https://api.royalti.io
    description: Production server
  - url: https://api-dev.royalti.io
    description: Development server
  - url: http://localhost:8084
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Accounting
    description: Accounting and financial transaction operations
  - name: DDEX
    description: DDEX operations (ERN/MEAD, messages, delivery, providers)
  - name: Label
    description: Label management operations
  - name: Internal Webhooks
    description: Internal system webhooks for royalty processing and downloads
  - name: Payment Webhooks
    description: Payment processor webhook endpoints
  - name: Billing Webhooks
    description: Stripe billing and subscription webhooks
  - name: Infrastructure Webhooks
    description: Cloudflare domain and SSL webhooks
  - name: Distribution Webhooks
    description: Digital distribution platform webhooks (FUGA)
paths:
  /auth/:
    get:
      tags:
        - Auth
      summary: Get logged in users data
      description: >-
        **/auth/**


        **Description:**  

        The `/auth/` endpoint provides access to information about the currently
        logged-in user, including their user data and authentication details.


        **Method:**  

        `GET`


        **Response:**  

        Upon successful retrieval of the user's data, the endpoint returns the
        user's information in the response body.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  user:
                    type: object
                    properties:
                      fullName:
                        type: string
                      email:
                        type: string
                      lastLogin:
                        type: string
                        nullable: true
                      TenantId:
                        type: integer
                      id:
                        type: string
                      UserId:
                        type: string
                      nickName:
                        type: string
                      paymentSettings:
                        type: object
                        properties:
                          AccountNumber:
                            type: string
                          accountName:
                            type: string
                          bank:
                            type: string
                          bankCode:
                            type: string
                          paypalcurrency:
                            type: string
                          wirecurrency:
                            type: string
                          paypalEmail:
                            type: string
                          beneficiaryType:
                            type: string
                          bankCountry:
                            type: string
                      userType:
                        type: array
                        items:
                          type: string
                      externalId:
                        type: string
                        nullable: true
                      firstName:
                        type: string
                      lastName:
                        type: string
                      profileImg:
                        type: string
                        nullable: true
                      phone:
                        type: string
                      country:
                        type: string
                      ipi:
                        type: string
                        nullable: true
                      role:
                        type: string
                      isActive:
                        type: boolean
                      signUpForm:
                        type: object
                      permissions:
                        type: string
                        nullable: true
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                      User:
                        type: object
                        properties:
                          email:
                            type: string
                  workspace:
                    type: object
                    properties:
                      name:
                        type: string
                      uid:
                        type: string
                      bigqueryDataset:
                        type: string
                      workspaceSettings:
                        type: array
                        items:
                          type: object
                      addons:
                        type: array
                        items:
                          type: object
                      subscriptions:
                        type: array
                        items:
                          type: object
              example:
                message: Successful
                user:
                  fullName: Emmanuel Umukoro
                  email: emma221999@gmail.com
                  lastLogin: null
                  TenantId: 1
                  id: 7c5c54e3-b6e0-4b89-b443-928727b9a931
                  UserId: f4b4e2f8-fe5e-4076-9e09-3424ff7f185f
                  nickName: iEmmanuel104
                  paymentSettings:
                    AccountNumber: '1234567890'
                    accountName: Royalti Account
                    bank: AFRICA FINANCE CORPORATION
                    bankCode: '44444'
                    paypalcurrency: USD
                    wirecurrency: USD
                    paypalEmail: royalti@gmail.com
                    beneficiaryType: company
                    bankCountry: Nigeria
                  userType:
                    - Artist
                  externalId: null
                  firstName: Emmanuel
                  lastName: Umukoro
                  profileImg: null
                  phone: '080628537875'
                  country: Algeria
                  ipi: null
                  role: admin
                  isActive: true
                  signUpForm: {}
                  permissions: null
                  createdAt: '2023-05-18T14:09:05.008Z'
                  updatedAt: '2024-03-22T11:10:53.519Z'
                  User:
                    email: emma221999@gmail.com
                workspace:
                  name: Royalti Demo
                  uid: 7bd60554-4f63-4c62-a5f6-c29c3f67cb2a
                  bigqueryDataset: royalti_demo
        '401':
          description: Expired Access token
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      status:
                        type: integer
                      message:
                        type: string
              example:
                error:
                  status: 401
                  message: ' JWT token expired '
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: array
              items:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Format: "Bearer
        {token}"

````