• Join - It's Free

Using the access token

Started by Ville Laakso on Tuesday, March 29, 2022
Problem with this page?

Participants:

Related Projects:

This discussion has been closed by an administrator.
Showing all 4 posts

Hey,

I've been trying to figure out how to pass the access token to the Geni API, but so far I haven't been successful.

I am able to call the oauth/request_token endpoint and receive a JSON response with the access_token, refresh_token and expires_in.

I am able to call the oauth/validate_token?access_token=<token here> and get a JSON response with "result": OK.

I have then tried to use the access_token in an api call by passing the access_token as a parameter to the query. Like for example:
https://www.geni.com/api/profile-122248213/immediate-family?access_... here>

But I get an error like this:
"message": "You must be logged in or have an access token in order to call this API"

I could not find any mention in the API documentation on how the access_token should be passed to the API. I have also tried passing it in the HTTP headers with "Authorization: Bearer <token here>". Both methods have the same results.

Also getting a lot of rate limit exceeded messages, which makes this rather slow to test.

So I am asking if anyone could help me to figure out how I can use the access_token with the API correctly?

It looks like you're passing a client token.
You obtained it for your app.

Do you mean that an access_token acquired using the grant type client_credentials will not be able to access the data I am trying to access?

It's not the data, it's the grant type.
If your app is making the request you can use the token
obtained via grant_type=client_credentials

If you're making the request in your browser use a token
obtained via grant_type=password

Showing all 4 posts

Create a free account or login to participate in this discussion