Can't find SECRET_KEY

Hi, I have no SECRET_KEY in my dashboard, only “API Key ID”. Can you tell me where to find the secret key, please?

As per documentation: “Broker API must authenticate using HTTP Basic authentication. Use your correspondent API key ID and secret as the username and password.”

apca

I’m trying to authenticate using requests library in Python like this:

import requests
from config import *

APCA_API_BASE_URL='https://paper-api.alpaca.markets'

ACCOUNT_URL = '{}/v2/account'.format(APCA_API_BASE_URL)

r = requests.get(ACCOUNT_URL, headers={'APCA-API-KEY-ID': API_KEY})

print(r.content)

I get the following error: b’{“message”: “forbidden.”}\n’

@LoopBurglar Could you please try regenerating your API keys from the Paper dashboard?

  1. Login to app.alpaca.markets ,go to your paper trading view.
  2. On the right hand side, next to your keys, click on the View button
  3. You’ll see your key id, and you can regenerate a new key and secret.
  4. Please note this will only show once and you will need to write it down/save it.
1 Like

Awesome, thanks! That’s sorted it.