Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Introspect 1.1 Endpoint 404 Not Found

ANSWERED

I'm using the following to make a request to the introspect API:

POST /1.1/oauth2/introspect?token=<token> HTTP/1.1
Host: api.fitbit.com
Content-Type: application/x-www-form-urlencoded
Authorization: Bearer <token>

where <token> is an OAuth 2.0 token. This token works for requesting data from other endpoints

 such as sleep and profile. The endpoint URL ends up looking like:

https://api.fitbit.com/1.1/oauth2/introspect?token=<token>

When I make the request I receive: 

{
    "errors": [
        {
            "errorType": "not_found",
            "fieldName": "n/a",
            "message": "The API you are requesting could not be found."
        }
    ],
    "success": false
}

 Is there something I'm doing wrong here? It's strange because the endpoint seems to be validating my request correctly, for example if I remove the token parameter it lets me know that it is required. I also tried different HTTP methods, and I updated my profile to include Read and Write access incase that was necessary for POST requests. I also updated the token to have access to all scopes, nothing is working.

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Hi @calum_sieppert 

 

I've tested several variations of the syntax, and you need to execute the endpoints as they are documented, https://dev.fitbit.com/build/reference/web-api/oauth2/#retrieve-state-of-tokens.   You'll need to include "https://api.fitbit.com" in the URL and specify the token that you're retrieving the state of as a body parameter, not a query parameter.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

View best answer in original post

Best Answer
0 Votes
2 REPLIES 2

Hi @calum_sieppert 

 

I've tested several variations of the syntax, and you need to execute the endpoints as they are documented, https://dev.fitbit.com/build/reference/web-api/oauth2/#retrieve-state-of-tokens.   You'll need to include "https://api.fitbit.com" in the URL and specify the token that you're retrieving the state of as a body parameter, not a query parameter.

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Thank you @Gordon-C, my mistake! For those looking, the request now looks like:

POST /1.1/oauth2/introspect HTTP/1.1
Host: api.fitbit.com
Content-Type: application/x-www-form-urlencoded
Authorization: Bearer <token>

token=<token>
Best Answer
0 Votes