In the Travis-CI APIs v2 and v2.1 there was an option to generate a Travis API token using a github API token. However, this Travis token is incompatible with Travis APIv3 and will give a 403 error.
Is there a way to:
a) generate a Travis-CI APIv3 token using a github token or
b) convert an APIv2.x token to an APIv3 token
Any help would be appreciated
https://github.com/travis-ci/travis-ci/issues/9273
Seems like it is not support yet. Using V2 seems to be the solution for now.
Related
I am trying to use the bitbucket code search API and I am getting 401 error "Token is invalid or not supported for this endpoint."
I created a repository access token and can access this particular URL 'https://api.bitbucket.org/2.0/repositories/{username}' with an authorization bearer token in the header without any issue.
But I couldn't access the code search API with the same token. I am having an invalid token issue. My code search api -
https://api.bitbucket.org/2.0/teams/{username}/search/code?search_query=repo%3Asample%20source
username- sam
https://bitbucket.org/blog/bitbucket-code-search-api-now-available
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-other-operations/#api-teams-username-search-code-get
I am following the above two articles. In these articles it is mentioned like 'GET /2.0/teams/{username}/search/code'
what username I should give? I already tried with 'sam'
In the first article I am seeing the api you provided and what is "%7B6f461d1e-a3dd-433b-a0e3-7a69daf6ea47%7D" ?
https://api.bitbucket.org/2.0/teams/**%7B6f461d1e-a3dd-433b-a0e3-7a69daf6ea47%7D**/search/code?search_query=repo%3Aelasticsearch%20QueryBuilders
kindly provide more suggestions on this.
Note: This is a private repository and I am the only user in it.
I created a new app registration and set scopes for Application.Read.All and User.Read.All. I exposed one custom scope as access_as_user. Using v2 token endpoint still giving v1 tokens that is the main issue now.
v1 token endpoint: https://login.microsoftonline.com/tenantid/oauth2/token
v2 token endpoint: https://login.microsoftonline.com/tenantid/oauth2/v2.0/token
Both endpoints giving tokens with same version i.e, version 1.0 Why so?
If I registered multitenant applications then it is giving tokens with version 2.0 with both endpoints.
My requirement is to get v2.0 tokens for single tenant applications. Any way to achieve this?
I tried to reproduce the same in my environment and got below results:
I registered one single tenant application and granted API permissions like below:
When I checked the Manifest of this application, accepted token version is null as below:
I generated the token for custom scope using v2.0 token endpoint via Postman like below:
POST https://login.microsoftonline.com/<tenantID>/oauth2/v2.0/token
grant_type:client_credentials
client_id:<appID>
client_secret:<secret>
scope: api://xxxxxxxxxxxxxxxxxxx/.default
Response:
When I decoded the above token in jwt.ms, token version is 1.0 as below:
To get v2.0 token, you need to change your application's Manifest like below:
When I generated the token again and decoded it, I got the token version as 2.0 as below:
In your case, change the accessTokenAcceptedVersion to 2 in your Manifest's file and generate the token again.
I am trying integrate Devops with another 3rd part system, but i tried to access Devops from postman using oAuth2.0, but it is always failing, throwing me a error {"Error":"invalid_client","ErrorDescription":"Invalid client auth token."}
Does Devops support oAuth? if so what i am missing so i got this error?
The problem is that DevOps is using non standard headers for some reason. This causes the built in postman to not work. The way that I figured out to work around this is to input the Auth url directly into your browser. You can then extract the auth code from the callback URL.
Then with that code, make a post to the token endpoint in postman
https://app.vssps.visualstudio.com/oauth2/token
Use x-www-form-urlencoded body and fill out the following keys
"client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"
"client_assertion", your app secret
"grant_type", "urn:ietf:params:oauth:grant-type:jwt-bearer"
"assertion", your auth code from previous step
"redirect_uri", your callbackurl
Azure DevOps supports oAuth. If you follow the steps in the link below to get an oAuth token, and type the token directly in Postman, you'll get a successful response:
https://github.com/Microsoft/azure-devops-auth-samples/tree/master/OAuthWebSample
I am using scribe 1.3.1.jar.
I have successfully authenticated user with twitter using this jar.
But I am facing problem while authenticating user with linkedin using the same jar.
I am getting this error while obtaining access Token. I have successfully get request token & verifier.But the problem creeps when i tried getting access Token & got following exception:
Response body is incorrect. Can't extract token and secret from this:
oauth_problem=signature_invalid&oauth_problem_advice=com.linkedin.security.auth.pub.LoginDeniedInvalidAuthTokenException%20while%20obtaining%20request%20token%20for%20%3APOST%26https%253A%252F%252Fapi.linkedin.com%252Fuas%252Foauth%252FaccessToken%26oauth_consumer_key%253Dxuk04eooznqu%2526oauth_nonce%253D2417349075%2526oauth_signature_method%253DHMAC-SHA1%2526oauth_timestamp%253D1365577634%2526oauth_token%253D7277829e-e121-4b76-b0f4-8f5e9e6c7be8%2526oauth_verifier%253D66312%2526oauth_version%253D1.0%0AOAU%3Axuk04eooznqu%7C7277829e-e121-4b76-b0f4-8f5e9e6c7be8%7C%2A01%7C%2A01%3A1365577634%3AlCqOvqH1tkJAtpGa58tnEhqwdRQ%3D
I feel really stuck in this.
Please Help!.
Take a look at this blog post: http://www.objectpartners.com/2012/04/03/linkedin-api-in-a-grails-application/
It shows how to use the OAuth plugin which uses the Scribe library. Hope that helps!
There are no clear docs or anything. shadowhand's demo repo is broken. How to actually use Twitter Oauth provider in Kohana 3.0?
It's a bit complicated, but the steps basically are:
Build an OAuth_Consumer
Build a OAuth_Provider (twitter)
Get a request token
Redirect them to the authorize_url
Get the callback
Exchange the request token for an access token
Make API calls
Here's an example controller that does all of that: https://gist.github.com/1267793