Aura db, http mode, no option of tying client-id to a instance

I have created two instances free and professional.

I have got client secret.

I am able to get Bearer token.

When i try to use i get "error": "Requested endpoint is forbidden"

ChatGPT told,

You are missing database scope in the token.

We must confirm:

:check_mark: Your client is tied to a database
:check_mark: The correct scope appears (like database/59xx244)
:check_mark: You are using the right instance ID

However in Aura console, there is no way of tying client-id to a instance.

Are you trying to query the database using HTTP or access the Aura API for management of aura ?

If you are trying to query, then you would POST to https:///db//query/v2

An authorization header is needed with each request . That is formed from the username and password for the aura db. A guide to that is here:-

https://neo4j.com/docs/query-api/current/authentication-authorization/

The body of the request is where you specify your query. An example is

{

"statement": "MATCH (n) RETURN n LIMIT 1"

}

A fuller guide can be found here:- https://www.pm50plus.com/2024/09/06/aura-query-api-ga.html

This format worked

curl --location 'https://AURA_HOSTNAME/db/neo4j/query/v2' \
 --user neo4j:AURA_DB_PASSWORD \
 --header 'Content-Type: application/json' \
 --header 'Accept: application/json' \
 --data '{ "statement": "RETURN 1" }'

Documentation is not clear about this. I was wasting time with bearer token, etc

Thank you

The solution suggested works. But it is not a standard practice to send userid/password in every http call.

We need to use Bearer token or something like that. We cannot use the solution suggested as it is not the standard practice.