#Railway API Token Permissions Issue

77 messages · Page 1 of 1 (latest)

true lynx
#

Account token or project token should work here. Do you have multiple environments in this project?

#

Which are you using btw, account or project

tardy pendant
#

i generated token from account settings

#

im developing a no code application which should deploy the backend to railway.

the repos are successfully built, but im having trouble auto deploying to railway.

true lynx
#

Have you tried using a project scoped token instead? Just to test.

tardy pendant
#

is this only for paid version?

#

clicking verify account takes you to plans page

true lynx
#

@acoustic terrace

#

@tardy pendant Do NOT click that.

acoustic terrace
#

Well hmmm

true lynx
# tardy pendant

This is on Railway? That's some crazy contrast for a Railway page.

tardy pendant
#

its the hdr from my screen shot

acoustic terrace
#

Hey Gabriel!
Do you have any themes or extensions on to modify the colors? Looks a bit off

tardy pendant
true lynx
acoustic terrace
#

Want to make sure you arent entering sensitive information anywhere other then railway 😁

true lynx
#

Verification shouldn't charge you anything

tardy pendant
#

it doesnt take me to a verify page.

#

where do i verify?

true lynx
#

Where does it take you?

tardy pendant
true lynx
#

🤨

#

Hmm

tardy pendant
#

haha maybe slight routing issue

true lynx
#

yeah that is weird.

tardy pendant
#

better screenshot if it helps

true lynx
#

this happens when Railway deems your github account too suspicious to allow you to host code on it freely

Looks like you may need to upgrade

acoustic terrace
#

Looks like limited trials cant create project tokens

true lynx
#

I asked on your behalf and found out that Railway has given exceptions to this rule before, and I'm sure Railway would be happy to support your needs. On that note, I recommend you email [email protected] from the email you use on Railway and explain your use case and the problem you're facing and they might be able to help you.

You can email them if you need. But regardless account tokens should totally work

#

Can you share your exact GraphQL request?

tardy pendant
#

maybe for context. im building no code application. i currently have generations going to repos and i need to host the backend for each corresponding repo.

true lynx
#

Testing on my own

tardy pendant
#

i may not be doing this in the ideal fashion either if you have tips

#

i tried the cli first, but i didnt have success

true lynx
#

Just looks like your request is a little borked

tardy pendant
#

i have it setup for render, but have limitation that i cannot make hosting for each repo without paying (they limit to one). i honestly dont want to pay unless i actually plan to release it

i cannot use a multi tenat structure with what im using for the generated backends

true lynx
#

Sending you the correct one

#
mutation serviceCreate {
  serviceCreate(
    input: {
      projectId: "7f46c0f9-0597-4cc4-887d-b4e34923a37b"
      source: { image: "postgres" }
      name: "Hello world"
    }
  ) {
    id
  }
}

Here you go! You can see where I set the image, you can change that to repo to be a source link. Name and projectId are a given. No query variables required.

#

@tardy pendant ^^

tardy pendant
#

Thank you! 🙏

got past the mutation structure issue, but now hitting a new 400 error during service creation. The logs show our request is correct but Railway returns a generic "Problem processing request" error with no details.

Our request:
mutation serviceCreate {
serviceCreate(
input: {
projectId: "f942a2cc-2975-4d34-9083-zzzzzzzzREMOVEDzzzzz"
source: {
repo: "https://github.com/.............REMOVED"
rootDirectory: "backend"
}
name: "no-code-app-xyz"
}
) { id }
}

Error: {"errors":[{"message":"Problem processing request","traceId":"3755196274180473766"}]}

Repository is public, has frontend/, backend/, README.md structure

I think the generic err could be because im not verified/paid user?

true lynx
tardy pendant
#

source: { repo: "railwayapp-templates/django" }

Do I just add /backend like this?

true lynx
#

No... I'm trying to figure out how to do this

true lynx
#

Not sure why that spacing got all weird but

#

You get it

tardy pendant
#

sorry for the late response, i dont believe that it working

true lynx
tardy pendant
#

am i setting the root dir correctly?
mutation updateService {
serviceInstanceUpdate(
serviceId: "ea40ba6e-bd1b-4221-a4b9-d9ZZZZZZZ534",
input: {
rootDirectory: "backend"
}
) {
id
}
}

true lynx
tardy pendant
#

where in the docs did you find to use this
mutation updateService {
serviceInstanceUpdate(
serviceId: "service-id",
input: {
rootDirectory: "directory"
}
)
}

#

const createMutation = mutation serviceCreate { serviceCreate( input: { projectId: "${this.projectId}" source: { repo: "${repoPath}" } name: "${serviceName}" } ) { id } } ;

const updateMutation = `
  mutation updateService {
    serviceInstanceUpdate(
      serviceId: "${serviceId}",
      input: {
        rootDirectory: "${rootDir}"
      }
    ) {
      id
    }
  }
`;

const mutation = `
  mutation SetEnvironmentVariables($input: ServiceEnvironmentVariablesInput!) {
    serviceEnvironmentVariables(input: $input) {
      id
      name
    }
  }
`;
true lynx
tardy pendant
#

ok it does work like this const updateMutation = mutation updateService { serviceInstanceUpdate( serviceId: "${serviceId}", input: { rootDirectory: "${rootDir}" } ) } ;

tardy pendant
#

the issue is now the env var one mildpanic

true lynx
tardy pendant
#

chatting with copilot

true lynx
#

Well hopefully this is a lesson

#

I’m scrolling through possible methods on the actual docs right now, you can too

#

VariableCollectionUpsertInput

I believe this is what you need to use

tardy pendant
#

yes ive been using the docs, but they are kinda brief tbh

true lynx
#

The documentation’s hyperlinking is broken but you can find it in the playground

tardy pendant
#

oh i see now. thank you!

true lynx
tardy pendant
#

[SERVER] Response: {"error":"Generation failed","message":"App deployment failed: Failed to create Railway web service: Railway GraphQL error: Your account is on a limited plan. Please visit railway.com/account/plans for details."}

yea seems its not going to work as the free plan though, going to reach out to [email protected]

#

i appreciate your responses. do you work for railway?

true lynx