# Create New Token For User:- 403 Forbidden

**URL:** <https://discourse.jupyter.org/t/create-new-token-for-user-403-forbidden/28663>\
**Category:** Zero to JupyterHub on Kubernetes\
**Tags:** help-wanted\
**Created:** [September 25, 2024, 9:15am UTC](https://discourse.jupyter.org/t/create-new-token-for-user-403-forbidden/28663 "2024-09-25T09:15:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aradhya\_dimri](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/aradhya_dimri/32/14849_2.png) [@aradhya\_dimri](https://discourse.jupyter.org/u/aradhya_dimri)\
**Post date:** [September 25, 2024, 9:15am UTC](https://discourse.jupyter.org/t/create-new-token-for-user-403-forbidden/28663/1 "2024-09-25T09:15:11Z")

</div>

I was trying to use the create new token api for my user admin through postman but its  
giving this 403 error.

I know i can create it through UI by logging in but can’t i create the token through backend as well?

 ![Screenshot 2024-09-25 144416](https://canada1.discourse-cdn.com/flex031/uploads/jupyter/original/2X/1/1071796d28aca87dcb8057a25d7ce9a2eafad0ca.png)

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [September 25, 2024, 11:17am UTC](https://discourse.jupyter.org/t/create-new-token-for-user-403-forbidden/28663/2 "2024-09-25T11:17:49Z")

</div>

You can create a new token using the API, but you’ll always need at least one manually created token to make that call.

You can either create that first token through the UI, or you could define an external JupyterHub service and define your own `api_token`:

> **[Services](https://jupyterhub.readthedocs.io/en/latest/reference/services.html#properties-of-a-service)**
>
> Definition of a Service: When working with JupyterHub, a Service is defined as something (usually a process) that can interact with the Hub’s REST API. A Service may perform a specific action or ta...

---

<div class="post-metadata">

**Author:** ![aradhya\_dimri](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/aradhya_dimri/32/14849_2.png) [@aradhya\_dimri](https://discourse.jupyter.org/u/aradhya_dimri)\
**Post date:** [September 27, 2024, 11:54am UTC](https://discourse.jupyter.org/t/create-new-token-for-user-403-forbidden/28663/3 "2024-09-27T11:54:05Z")

</div>

This might require changes in jupyter\_config.py is there a way i can use this in values.yaml.

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [September 27, 2024, 8:54pm UTC](https://discourse.jupyter.org/t/create-new-token-for-user-403-forbidden/28663/4 "2024-09-27T20:54:15Z")

</div>

Yes, you can set [`hub.services`](https://z2jh.jupyter.org/en/stable/resources/reference.html#hub-services)

---

<div class="post-metadata">

**Author:** ![aradhya\_dimri](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/aradhya_dimri/32/14849_2.png) [@aradhya\_dimri](https://discourse.jupyter.org/u/aradhya_dimri)\
**Post date:** [September 30, 2024, 7:52am UTC](https://discourse.jupyter.org/t/create-new-token-for-user-403-forbidden/28663/5 "2024-09-30T07:52:41Z")

</div>

Yep thx it works

```auto
services:
    service-admin:
      name: service-admin
      apiToken: my_api_token
      admin: true

```
