# API to programmatically generate a token

**URL:** <https://discuss.bitrise.io/t/api-to-programmatically-generate-a-token/6863>\
**Category:** Website\
**Created:** [November 20, 2018, 12:47am UTC](https://discuss.bitrise.io/t/api-to-programmatically-generate-a-token/6863 "2018-11-20T00:47:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dtweston](https://avatars.discourse-cdn.com/v4/letter/d/94ad74/32.png) [@dtweston](https://discuss.bitrise.io/u/dtweston)\
**Post date:** [November 20, 2018, 12:47am UTC](https://discuss.bitrise.io/t/api-to-programmatically-generate-a-token/6863/1 "2018-11-20T00:47:56Z")

</div>

## Description of the feature request

OAuth API for generating a token for use by an external tool.

## Use case / for what or how I would use it

When building a tool that integrates with Bitrise, the user currently needs to generate a personal API token manually. It would be nice if the tool could present a more user-friendly interface for the user to login with Bitrise and obtain an API token.

---

<div class="post-metadata">

**Author:** ![bitce](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/bitce/32/1639_2.png) [@bitce](https://discuss.bitrise.io/u/bitce)\
**Post date:** [November 20, 2018, 1:55pm UTC](https://discuss.bitrise.io/t/api-to-programmatically-generate-a-token/6863/2 "2018-11-20T13:55:34Z")

</div>

Thanks for the #feature-request @dtweston! This would be very convenient for sure, can you give us some example use cases?

---

<div class="post-metadata">

**Author:** ![dtweston](https://avatars.discourse-cdn.com/v4/letter/d/94ad74/32.png) [@dtweston](https://discuss.bitrise.io/u/dtweston)\
**Post date:** [November 22, 2018, 8:21pm UTC](https://discuss.bitrise.io/t/api-to-programmatically-generate-a-token/6863/3 "2018-11-22T20:21:14Z")

</div>

As I mentioned in the other thread, I’m planning to build a Mac menubar app to monitor your builds, so it would be nice to be able to let the user login and obtain a token.

Ideally, I could pop up a web view in my app, let the user login to Bitrise, and get a redirect back to my app with the token (something like: bitrise-app://login?token={token}).
