API call fails

rgelb's Avatar

rgelb

18 Jun, 2025 06:12 PM

Went and got an API key. But the call fails.
Unclear why. The return value doesn't provide any clues.

I want to kick off deployments in an automated manner - this was the first step that I can't get past.

  1. Support Staff 1 Posted by Feodor Fitsner on 18 Jun, 2025 06:30 PM

    Feodor Fitsner's Avatar

    "v2" tokens require account information in the URL. Try it with:

    https://ci.appveyor.com/api/account/{your-account-name}/environments
    
  2. 2 Posted by rgelb on 18 Jun, 2025 06:35 PM

    rgelb's Avatar
  3. Support Staff 3 Posted by Feodor Fitsner on 18 Jun, 2025 06:49 PM

    Feodor Fitsner's Avatar

    rgelb does not look like a real account name. You can see account name in the header of AppVeyor web portal, next to its logo.

  4. 4 Posted by rgelb on 18 Jun, 2025 07:10 PM

    rgelb's Avatar
  5. 5 Posted by rgelb on 18 Jun, 2025 07:16 PM

    rgelb's Avatar

    Based on the image above, what is my account name that i should be using?

  6. Support Staff 6 Posted by Feodor Fitsner on 18 Jun, 2025 07:19 PM

    Feodor Fitsner's Avatar

    It's on the left, next to AppVeyor logo, please see attached screenshot.

  7. Support Staff 7 Posted by Feodor Fitsner on 18 Jun, 2025 07:20 PM

    Feodor Fitsner's Avatar

    Or it's in URL between "account" and "projects" like on my screenshot.

  8. 8 Posted by rgelb on 18 Jun, 2025 08:09 PM

    rgelb's Avatar

    Ahhh, ok. That was completely different from my login name. Cool. Thanks.

    You don't have, by any chance, a sample project (in whatever language) that looks for the last successful build for a specific project name, then deploys it to a specific environment.

  9. Support Staff 9 Posted by Feodor Fitsner on 18 Jun, 2025 08:45 PM

    Feodor Fitsner's Avatar

    Ah, nope, sorry. It should be fairly trivial since you've got API usage basics. Btw, you can see all API requests on "Network" tab of your browser while doing actions via UI.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • err.png 146 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac