---
title: "Generates an OAuth 1.0a header for authenticating requests to the X API."
method: POST
path: "/generateOAuthHeader"
---

# Generates an OAuth 1.0a header for authenticating requests to the X API.

`POST /generateOAuthHeader`

This function creates the Authorization header required for making authenticated requests to X. It takes the HTTP method, full URL, and optional additional parameters to generate a valid OAuth 1.0a header string.

## Request body

- object
  - `body` object — Body of the generateOAuthHeader sls call
    - `arguments` unknown[], required
      - unknown
    - `auth` object — Authentication object
      - `strategy` 'apikey' — Authentication strategy
      - `variables` unknown[] — Variables for the authentication strategy
        - unknown
    - `packageName` string — @microfox/twitter

## Response `200`

Successful response

- object
  - `oauthHeader` string — The generated OAuth 1.0a header

## Other responses

- `400` — Bad Request - Invalid input parameters
- `500` — Internal Server Error

---

[API](https://skmtc.net/microfox-ai/apis/microfox-x-sdk-api.md) · [All operations](https://skmtc.net/microfox-ai/apis/microfox-x-sdk-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/microfox-ai/microfox-x-sdk-api/versions/329b4bca235b/schema)
