Re: How do I create a barear token?

1,071 views
Skip to first unread message

Ivan Bazulic

unread,
Oct 29, 2020, 3:06:00 AM10/29/20
to stav alfi, quay-sig
Hi Stav,

Quay's API uses an Oauth bearer token to connect. You cannot use robot token credentials to authenticate yourself on API requests. To obtain the Oauth token, create an organization under your username and inside create an Oauth application (tab "Applications" once you open org settings, not the top "Applications" tab but the icon "Applications" on the left side). You can skip all options on the first page when creating and just click on the "Generate token" button.

HTH!

On Thu, Oct 29, 2020 at 12:33 AM stav alfi <stav...@gmail.com> wrote:
The robot token does not work:

headers: {
Authorization: `Bearer <my-robot-token>`,
},
resolveBodyOnly: true,
responseType: 'json',
json: {
repo_kind: 'image',
namespace: 'stavalfi+stav1',
visibility: 'public',
repository: 'build-poc3',
description: 'lala',
},
})

When using the swagger UI, everything works great.

the swagger token looks like this (changed):

GJooMifxe7gqtXmIKvyP2gzmzPRB0phOZ4fF01Eq

while the robot token looks like this: (changed):

5FKOTEWNFHO866GY0MDUW47GFYIC3YCLRSPWQBOK2I54KYLPW78B9OH9HR0Z0NCB


------------


How do I get the token?

--
You received this message because you are subscribed to the Google Groups "quay-sig" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quay-sig+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quay-sig/5e3233b4-e67c-4a11-84e6-f3e839f44cb0n%40googlegroups.com.


--

IVAN BAŽULIĆ

SENIOR SUPPORT ENGINEER

Red Hat EMEA

Communications House,
Cork Road,
Waterford X91 NY33

ibaz...@redhat.com    M: +385959269281     IM: ibazulic

stav alfi

unread,
Oct 29, 2020, 11:27:40 AM10/29/20
to quay-sig
Thanks. I think that you responded it in the wrong location ;P
Reply all
Reply to author
Forward
0 new messages