Connecting to grafana API while using google sso authentication

Hey guys, I’m trying to automate our Grafana dashboard and alert creation in code and i try to connect with an api key to the grafana using curl but i only get a “302 found response”
my request is something like:

curl -X POST -H "Authorization: Bearer XXXXXXXXXXXXXXXXXX" -H "Content-Type: application/json" -d '{
  "dashboard": {
    "id": null,
    "title": "Matan API Test",
    "tags": [ "templated" ],
    "timezone": "browser",
    "rows": [
    "schemaVersion": 6,
    "version": 0
  "overwrite": false

and the response is:

<head><title>302 Found</title></head>
<center><h1>302 Found</h1></center>

even when i do something simple like:
curl -H "Authorization: Bearer XXXXX"
it’s the same result… do i need to do something with the google auth first?

apperantly we had aws cognito in the middle that caused a lot of issues now works fine :smiley: