NTERNAL_SERVER_ERROR Forbidden while creating a page after the login #6835
-
|
I checked this post(#5601) but I couldn't solve my problem yet. I sent the request the login first like the below. It works well so and then I sent another request to create a page like the below. They worked well but when I checked the Created By of the page that I just created, it was admin not the credential that I logged in. But the error message is forbidden. The installation setup is the own server and docker image. Could you give me some advice on this? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
|
I'm Doyoung's colleague and working with him on the project. Second thing we tried is then to login first, then create a page. That's why we tried to push one GraphQL request containing both mutation (first mutation is the log, second is the page creation). Both token were created this morning, so they are valid. |
Beta Was this translation helpful? Give feedback.
-
|
You're making 2 parallel queries when they should be sequential. You need to login first, THEN make a second request with the page creation. Having both in the same request makes no sense. Although the proper way to do it would be to use an API token (that you generate via the Admin > API Access), rather than using the authentication endpoint with a user/pass. You need to pass the token via the |
Beta Was this translation helpful? Give feedback.
-
|
Hi Nicolas, Also if we don't login first, and directly create the page it does exactly the same thing. In all cases exposed here and above an API token was created. We tested an API token with full rights and an API token with admin rights. It makes no difference, the behaviour is the same. In all cases the token was in the HTTP headers. Let's rephrase things differently: |
Beta Was this translation helpful? Give feedback.
-
|
We want to login for 2 reasons:
|
Beta Was this translation helpful? Give feedback.

You're making 2 parallel queries when they should be sequential. You need to login first, THEN make a second request with the page creation. Having both in the same request makes no sense.
Although the proper way to do it would be to use an API token (that you generate via the Admin > API Access), rather than using the authentication endpoint with a user/pass. You need to pass the token via the
Authorizationheader, as explained in the docs.