How to use an API key with Odoo17 in POSTMan

I’m looking for a way to use an API key in Odoo 17 + PostMan. The documentation on Odoo is sparse an there is no 1 clear answer. I’ve spent almost 5hours of searching and there’s no clear answer on how to do this. Any help would be appreciated.

I have a vanilla installation of Odoo 17 running on local at http://localhost:8069

I’m able to authenticate in POSTMan using basic auth:

{{odoo-api}}/web/session/authenticate

{
    "jsonrpc": "2.0",
    "params": {
        "db" : "{{odoo-db}}",
        "login" : "{{odoo-username}}",
        "password" : "{{odoo-pwd}}"
    }
}

I’m NOT able to authenticate using POSTMan using

{
    "jsonrpc": "2.0",
    "params": {
        "db" : "{{odoo-db}}",
        "login" : "{{odoo-username}}",
        "password" : "{{odoo-api-key}}"
    }
}

Some suggestions for using an api key has been to include an

  • api_key header with value {{apikey}}
  • Authorization Bearer API_KEY header with value {{apikey}}
  • API_KEY header with value {{apikey}}

but I’m not having any success.

I’m expecting the typical application of an API key header with a header. Any help would be greatly appreciated.

  • Why don’t you, you know, ask the guys who created Odoo?

    – 

  • Those were the responses from the Odoo forums. I figured the people on there would know what the answer would be, but I’ve yet to find a functioning example.

    – 




Leave a Comment