web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

ChatGPT API Key

(0) ShareShare
ReportReport
Posted on by 4

Hello all. I have seen this posted elsewhere but with no definitive answer. I am attempting to create a custom connector for ChatGPT to integrate with a power app. I will add an API key to the connection, like shown, but when I go back to the connector and test it I recieve the error : "You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth (i.e. Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.",
"type": "invalid_request_error", As shown in the attached screenshot, I believe that I am correctly formatting the Key. Any help would be greatly appreciated (I cut out the middle of my key to upload said screenshot.) 

Key.png
Categories:
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @timber182111 ,

     

    Please check your header key name if it's set "Authorization" properly.

    vxiaochenmsft_0-1678849488168.png

     

    Best Regards,

    Wearsky

  • ngiam Profile Picture
    36 on at

    Hi @v-xiaochen-msft ,

     

    I'm having the same issue as above. How do I get to the menu that you had shared in the picture?

     

    Thank you !

    Ngiam

  • People21 Profile Picture
    2 on at

    does the apikey last a lifetime?

  • 4-more Profile Picture
    41 on at

    Just need to add bearer in front of key, then it works.

  • mikemax Profile Picture
    2 on at

    Hi,

    I will really appreciate if someone can help me out here, i have tried adding Bearer as prefix to the API key and in the connector settings it even shows its successfully connected, by when i test the bot and call the chat gpt api it gives me error - You didn't provide an API key. You need to provide your API key in an Authorization header using Bearer auth (i.e. Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if you're accessing the API from your browser and are prompted for a username and password. You can obtain an API key from https://platform.openai.com/account/api-keys.

     

    And for the past 2 attempts and i am getting the following error - Looks like your flow's operation is hitting an action limit designed to protect the connector service being called.

     

     

    PVA editorPVA editorConnectorConnectorPower AutomatePower AutomatePower Automate ErrorPower Automate ErrorAutomate RunsAutomate Runs

  • 4-more Profile Picture
    41 on at

    Are you paying for the API?

  • jcostas Profile Picture
    4 on at

    Hello, how can i ge to that Menu of your capture?

  • 4-more Profile Picture
    41 on at

    I think you need to be more specific

  • dmp569 Profile Picture
    8 on at

    I had the same issue. The solution for me was to put the right information in when creating the connection to test the connector. You have to put the word "Bearer " with the space before pasting in the API key you created in ChatGPT.

     

    dmp569_1-1698242158584.png

     

  • esbasti Profile Picture
    3 on at

    This is what worked for me. Thank you! @dmp569 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 317 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 247

#3
Henil Profile Picture

Henil 117

Last 30 days Overall leaderboard