# Codecov API: return token upon calls to regenerate

**URL:** <https://community.codecov.com/t/codecov-api-return-token-upon-calls-to-regenerate/1232>\
**Category:** Feature Requests\
**Created:** [April 6, 2020, 11:06pm UTC](https://community.codecov.com/t/codecov-api-return-token-upon-calls-to-regenerate/1232 "2020-04-06T23:06:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![schigh](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/schigh/32/668_2.png) [@schigh](https://community.codecov.com/u/schigh)\
**Post date:** [April 6, 2020, 11:06pm UTC](https://community.codecov.com/t/codecov-api-return-token-upon-calls-to-regenerate/1232/1 "2020-04-06T23:06:42Z")

</div>

**Summary**

Currently calling the [regenerate upload token](https://docs.codecov.io/reference#section-regenerate-upload-token) endpoint returns an HTTP status code of 204 with no response body. I would like to receive back the generated token so I can integrate it into my CI pipeline automation.

**Description**

I have a CI pipeline that allows my dev team to generate new services from a dashboard. As part of the service provisioning, I would like to inject the `CODECOV_TOKEN` env var into an encrypted secrets file along with other provisioning artifacts. Our CI can then decrypt this value and use it when new service builds are generated.

We are trying to reduce the number of unique vendor page visits that our developers have to make when setting up their services. Right now, developers have to go to Codecov and manually fetch the upload token. This wouldn’t be problematic in most cases, but in some instances we are working with other organizations and dont share IT or other administrative access, and in those cases our IT has to intervene and either set up the token or give the developer temporary access.

Is it possible to expose this token as a result of the regenerate token call?

**Examples**

No applicable examples

**Versions**  
Most of our services are written in Go. We use GitHub Enterprise for code hosting. Our current CI is Codeship, but we are comtemplating GitHub Actions

---

<div class="post-metadata">

**Author:** ![tom](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/tom/32/8_2.png) [@tom](https://community.codecov.com/u/tom)\
**Post date:** [April 22, 2020, 4:01pm UTC](https://community.codecov.com/t/codecov-api-return-token-upon-calls-to-regenerate/1232/4 "2020-04-22T16:01:42Z")

</div>

Hi @schigh, thanks for the request. The product team will take a look at the effort to implement this in the next sprint.
