Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket API error of “Missing valid JWT token” when requesting next page for variable

Chris Stryczynski May 4, 2018

 I'm using v2 of the API

 

https://api.bitbucket.org/2.0/repositories/**/**/pipelines_config/variables/

 

This works fine up to 10 variables, after which it gives a pagination link for 'next'.... Which is a v1 url...

And the v1 probably uses a different authentication as it gives me an error of:

 

{"error":{"message":"Unauthorized","detail":"Missing valid JWT token","data":{"key":"rest-service.rest-service.unauthorized","arguments":{}}}}

 

It's incredibly frustrating working with this API...

1 answer

1 accepted

0 votes
Answer accepted
Yana
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 4, 2018

Hi Chris, 

Thank you for reporting this, I was able to reproduce this and will create a bug for it on our master site. 

However as a workaround here is the example of the request that you can use to get more than 10 variables: 

https://api.bitbucket.org/2.0/repositories/accountName/repo_slug/pipelines_config/variables/?pagelen=20&page=1

under "pagelen=20"  you can specify how many results per page you would like to see. 

Hope this helps 

Cheers.

Yana

Deleted user July 18, 2018

I've run into this same bug. Are there other workarounds?

I'm currently using basic authorization using an App Password, but if one can acquire a JWT token from just the App Password (Resource Owner Password Credentials grant?), I'd be happy to switch to that.

Deleted user July 18, 2018

@Yana

Can I get a reference to the bug for follow up purposes?

Yana
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 19, 2018

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events