cancel
Showing results for 
Search instead for 
Did you mean: 

Lendo dados de atividade do usuário / Reading user activity data

RB
Shkhara

Olá, em meu projeto estou conseguindo ler as informações do usuário, porém não estou conseguindo acessar as atividades. Sempre recebo o "IsSuccessStatusCode" false. Detalhe vou deixar uma imagem do meu código para facilitar. Li a documentação mais vezes e ainda não entendi o que estou fazendo de errado, se alguém puder me auxiliar, por favor! Api Strava.png

TRANSLATION: Hello, in my project I am able to read user information, but I am not able to access the activities. I always get "IsSuccessStatusCode" false. In detail, I will leave an image of my code to make it easier. I read the documentation several times and I still don't understand what I'm doing wrong, if anyone can help me, please!

1 ACCEPTED SOLUTION

ActivityFix
Kilimanjaro

Verifique se está a pedir o âmbito "activity:read" ou "activity:read_all" ao autorizar um utilizador -- https://developers.strava.com/docs/authentication/#detailsaboutrequestingaccess

TRANSLATION: Check whether you are requesting the "activity:read" or "activity:read_all" scope when authorizing a user -- https://developers.strava.com/docs/authentication/#detailsaboutrequestingaccess

View solution in original post

3 REPLIES 3

RB
Shkhara

Obrigado pela ajuda! esqueci de adicionar "activity:read_all" na minha url para o usuário autorizar. Agora estou com outra dúvida, na documentação tem algum exemplo mostrando uma forma correta de solicitar os dados de treino do usuário ? em meu print acima, desta vez o método retornou true, mas não encontrou nenhuma atividade.

TRANSLATION: Thank you for your help! I forgot to add "activity:read_all" in my url for the user to authorize. Now I have another question, is there an example in the documentation showing a correct way to request the user's training data? in my screenshot above, this time the method returned true, but found no activity.

Os campos "before" e "after" têm de ser marcas temporais de época (em segundos).
Deve definir "page" como 1 para os resultados iniciais.
"per_page" deve ser um número entre 1-200, recomendo o valor 200 se estiver a obter todas as actividades.

Se receber 200 resultados, efectue a mesma consulta com page=2 e repita até não receber mais resultados.

---

The "before" and "after" fields need to be epoch timestamps (in seconds).
You should set "page" to 1 for the initial results.
"per_page" should be a number between 1-200, I recommend 200 value if you are getting all activities.

If you receive 200 results, make the same query with page=2, and repeat until no more results are received.

ActivityFix
Kilimanjaro

Verifique se está a pedir o âmbito "activity:read" ou "activity:read_all" ao autorizar um utilizador -- https://developers.strava.com/docs/authentication/#detailsaboutrequestingaccess

TRANSLATION: Check whether you are requesting the "activity:read" or "activity:read_all" scope when authorizing a user -- https://developers.strava.com/docs/authentication/#detailsaboutrequestingaccess

Ready, Get Set, Go!

Welcome to the Community - here is your guide to help you get started!


Know how to use Community


Understand Community Settings