Skip to content

Issues with authentication #4

@rajBar

Description

@rajBar

Hi.... wondering how you managed to get this working without using strava oauth

I've looked at the GET request you've made in axios - changed the profile ID to mine, and changed the access_token to mine - but through POSTMAN I get "Authorization Error".

I get the same thing when the following axois request that I've more or less copied from you:

axios
            .get("https://www.strava.com/api/v3/athletes/59236473/activities", {
                params: {
                    access_token: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
                    per_page: "30"
                }
            })
            .then(response => {
                const activities = response.data;
                const cycles = activities.filter(activity => activity.type === "ride");
                this.setState({activities});
                this.setState({baseActivities: activities});
                this.setState({cycleActivities: cycles});
            });

error in networking of devtools:

{
    "message": "Authorization Error",
    "errors": [
        {
            "resource": "Athlete",
            "field": "access_token",
            "code": "invalid"
        }
    ]
}

EDIT:
I get an error saying that the token is invalid as I require ativity:read

but I'm wondering how you've been able to see your Activities with the token you have? Do you not have to change it every 6 hours etc? :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions