cancel
Showing results for 
Search instead for 
Did you mean: 

Authorization Error When Attempting to Create Kudos with Strava API v3

norunners
Mt. Kenya

Hello Strava Community Hub,

I am currently working with the Strava API v3, attempting to automate kudos creation for specific activity IDs using a valid access token. Despite the token having all necessary scoped permissions, I continually receive a `401 Unauthorized` error with the message `"Authorization Error"`. The access token is valid and not expired.

### Error Details:
```
{"message":"Authorization Error","errors":[]}
```

### Steps to Verify Access Token:
1. Checked that the access token is set correctly in my application.
2. Verified that the access token is not expired.
3. Confirmed that the token has all necessary scoped permissions for writing (required for creating kudos).

### Reproduction Steps:
If you would like to reproduce this error, please follow these steps (replace `<redacted>` with your actual valid access token):

```sh
% curl -X POST https://www.strava.com/api/v3/activities/9646819174/kudos \
-H "Authorization: Bearer <redacted>"
```

After executing this command, the response is a `401 Unauthorized` error with the message `"Authorization Error"`, even though a valid token is used in the request.

### Things I Have Tried:
- Verified that the access token is valid, not expired, and has the required scopes.
- Reauthenticated to obtain a new set of tokens.

### Request for Help:
I'm wondering if anyone else has encountered this issue or if there is something obvious that I am missing. I have followed Strava's API documentation closely and cannot seem to resolve this error.

If you have experienced this issue and found a solution, or if you have any suggestions on what might be causing this error, I would greatly appreciate your insights.

Thank you in advance for your help!

1 ACCEPTED SOLUTION

Jan_Mantau
Denali

You can't create kudos, you can only list existing kudos (it's a GET method). And the error most probably comes because your access token is authorized for the user that intends to give the kudo but the activity id belongs to another user for whom you don't have the access rights to list kudos.

View solution in original post

2 REPLIES 2

kavinoven
Shkhara

You've done a good job checking your access token, but there are a few more things to consider. Make sure you're not sending too many requests too quickly, as this can cause issues. Also, double-check that the activity ID you're using actually belongs to the user and exists.

Confirm that your token includes the right permission to give kudos. When you send your request, ensure you're using the correct format for the token in the header. If you're still having trouble, contact Strava's support or check their developer forums for help. Sometimes, even small mistakes can cause problems with APIs, so be patient and thorough in your checks.

Jan_Mantau
Denali

You can't create kudos, you can only list existing kudos (it's a GET method). And the error most probably comes because your access token is authorized for the user that intends to give the kudo but the activity id belongs to another user for whom you don't have the access rights to list kudos.